Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Csound WASM source map

Date2022-11-12 11:16
FromVictor Lazzarini
Subject[Csnd-dev] Csound WASM source map
I set up a page that imports a csound.js I got from npm install @csound/browser (from dist). I’ve copied both the js and js.map to the current directory where the html with the JS script  is.
This all works Ok.

However, I am getting these messages on the Chrome console

DevTools failed to load source map: Could not load content for http://localhost:8080/dist/__compiled.worklet.singlethread.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

So I am supposing that csound.js or csound.js.map are trying to load this file. I am supposing also that this is something that wasm may be generating. Does anyone know more?

========================
Prof. Victor Lazzarini
Maynooth University
Ireland


Date2022-11-14 12:32
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] Csound WASM source map
The source maps are a bit of pain, I try not to inline them to make sure the bundle is small as possible, and maybe we shouldn't even try to load any sourcemaps. But the source maps are a bit hard to get right in this case, because of the way I compile the workers. Which is to first minimize them as much as possible before I bundle them in the final csound bundle which is also minified. This creates a bit of disconnect with code failing in the workers and the actual line which the failing code is presented in. I think it's solvable with some source-map tools, but I can't imagine it being easy. The source maps should be coming with the csound package, but it will be on the user to include the file when they serve the js bundle. But it's kind-a useless even if it works, as it's more of a debugging tool, but in theory it could give nice information to developers when things go wrong. Still I think we should just remove it from the production code and keep it in the development code.

On Sat, 12 Nov 2022 at 12:16, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I set up a page that imports a csound.js I got from npm install @csound/browser (from dist). I’ve copied both the js and js.map to the current directory where the html with the JS script  is.
This all works Ok.

However, I am getting these messages on the Chrome console

DevTools failed to load source map: Could not load content for http://localhost:8080/dist/__compiled.worklet.singlethread.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

So I am supposing that csound.js or csound.js.map are trying to load this file. I am supposing also that this is something that wasm may be generating. Does anyone know more?

========================
Prof. Victor Lazzarini
Maynooth University
Ireland


Date2022-11-14 12:54
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Csound WASM source map
Thanks, so it means I can just ignore that warning, is it?

========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 14 Nov 2022, at 12:32, Hlöðver Sigurðsson  wrote:
> 
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> The source maps are a bit of pain, I try not to inline them to make sure the bundle is small as possible, and maybe we shouldn't even try to load any sourcemaps. But the source maps are a bit hard to get right in this case, because of the way I compile the workers. Which is to first minimize them as much as possible before I bundle them in the final csound bundle which is also minified. This creates a bit of disconnect with code failing in the workers and the actual line which the failing code is presented in. I think it's solvable with some source-map tools, but I can't imagine it being easy. The source maps should be coming with the csound package, but it will be on the user to include the file when they serve the js bundle. But it's kind-a useless even if it works, as it's more of a debugging tool, but in theory it could give nice information to developers when things go wrong. Still I think we should just remove it from the production code and keep it in the development code.
> 
> On Sat, 12 Nov 2022 at 12:16, Victor Lazzarini  wrote:
> I set up a page that imports a csound.js I got from npm install @csound/browser (from dist). I’ve copied both the js and js.map to the current directory where the html with the JS script  is.
> This all works Ok.
> 
> However, I am getting these messages on the Chrome console
> 
> DevTools failed to load source map: Could not load content for http://localhost:8080/dist/__compiled.worklet.singlethread.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
> 
> So I am supposing that csound.js or csound.js.map are trying to load this file. I am supposing also that this is something that wasm may be generating. Does anyone know more?
> 
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 


Date2022-11-14 14:12
FromDave Seidel
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Csound WASM source map
I don't know the specifics of this particular project, but I know that I've seen this message before a number of times on working projects without harm.

On Mon, Nov 14, 2022 at 7:54 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thanks, so it means I can just ignore that warning, is it?

========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 14 Nov 2022, at 12:32, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> The source maps are a bit of pain, I try not to inline them to make sure the bundle is small as possible, and maybe we shouldn't even try to load any sourcemaps. But the source maps are a bit hard to get right in this case, because of the way I compile the workers. Which is to first minimize them as much as possible before I bundle them in the final csound bundle which is also minified. This creates a bit of disconnect with code failing in the workers and the actual line which the failing code is presented in. I think it's solvable with some source-map tools, but I can't imagine it being easy. The source maps should be coming with the csound package, but it will be on the user to include the file when they serve the js bundle. But it's kind-a useless even if it works, as it's more of a debugging tool, but in theory it could give nice information to developers when things go wrong. Still I think we should just remove it from the production code and keep it in the development code.
>
> On Sat, 12 Nov 2022 at 12:16, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> I set up a page that imports a csound.js I got from npm install @csound/browser (from dist). I’ve copied both the js and js.map to the current directory where the html with the JS script  is.
> This all works Ok.
>
> However, I am getting these messages on the Chrome console
>
> DevTools failed to load source map: Could not load content for http://localhost:8080/dist/__compiled.worklet.singlethread.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
>
> So I am supposing that csound.js or csound.js.map are trying to load this file. I am supposing also that this is something that wasm may be generating. Does anyone know more?
>
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>


Date2022-11-14 15:43
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Csound WASM source map
it's harmless yes! Can be safely ignored.

On Mon, 14 Nov 2022 at 15:14, Dave Seidel <dave.seidel@gmail.com> wrote:
I don't know the specifics of this particular project, but I know that I've seen this message before a number of times on working projects without harm.

On Mon, Nov 14, 2022 at 7:54 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thanks, so it means I can just ignore that warning, is it?

========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 14 Nov 2022, at 12:32, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>
> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> The source maps are a bit of pain, I try not to inline them to make sure the bundle is small as possible, and maybe we shouldn't even try to load any sourcemaps. But the source maps are a bit hard to get right in this case, because of the way I compile the workers. Which is to first minimize them as much as possible before I bundle them in the final csound bundle which is also minified. This creates a bit of disconnect with code failing in the workers and the actual line which the failing code is presented in. I think it's solvable with some source-map tools, but I can't imagine it being easy. The source maps should be coming with the csound package, but it will be on the user to include the file when they serve the js bundle. But it's kind-a useless even if it works, as it's more of a debugging tool, but in theory it could give nice information to developers when things go wrong. Still I think we should just remove it from the production code and keep it in the development code.
>
> On Sat, 12 Nov 2022 at 12:16, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> I set up a page that imports a csound.js I got from npm install @csound/browser (from dist). I’ve copied both the js and js.map to the current directory where the html with the JS script  is.
> This all works Ok.
>
> However, I am getting these messages on the Chrome console
>
> DevTools failed to load source map: Could not load content for http://localhost:8080/dist/__compiled.worklet.singlethread.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
>
> So I am supposing that csound.js or csound.js.map are trying to load this file. I am supposing also that this is something that wasm may be generating. Does anyone know more?
>
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>