Re: [elm-discuss] Module intermittently missing from compiler output

2017-04-13 Thread Noah Hall
Never seen this before. Pop on to elm-dev on slack and I can help out. Will
be afk til Sunday though

On Thursday, April 13, 2017, Kevin Yank  wrote:

> For awhile now, we’ve been seeing intermittent issues with our build,
> where a particular module in our application will occasionally be missing
> from the JavaScript output produced by the Elm compiler. We’ve seen it
> happening both in our CI environment and when building assets for
> production. We have yet to see it happen on a development machine. As our
> codebase has grown, this issue seems to be occurring more and more often,
> so I thought it might be worth checking if anyone else in the community had
> experienced anything like it.
>
> As I said, the problem manifests itself by a build producing a JavaScript
> output file where a particular module is simply missing. We then see an
> error like this one at runtime:
>
> ReferenceError: Can't find variable: _user$project$Dialog$init
> http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:172568:83
> ReferenceError: Can't find variable: _user$project$Dialog$init
> http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:172568:83
> at http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.
> bundle.js:66078
> ReferenceError: Can't find variable: _user$project$Dialog$init
> ReferenceError: Can't find variable: _user$project$Dialog$init
> at http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.
> bundle.js:172568
> at http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.
> bundle.js:160309 in A2
> …
>
>
> When we repeat the build, we get a JavaScript bundle that works just fine.
> Comparing the contents reveals a chunk of JavaScript corresponding to one
> of our modules is simply missing. Where the Elm compiler seems to normally
> generate a single line of whitespace between two modules’ JavaScript
> output, there is a conspicuous two-line gap at the point where the missing
> code should be. Here’s what this looks like in a diff tool:
>
>
> Obviously this is a very long way from anything like a minimal test case
> that we could submit as a compiler bug, and unfortunately we can’t
> reproduce it reliably enough to be able to narrow it down.
>
> What I’m hoping is that someone else in the community is seeing something
> like this too. Actually, if I’m being honest, I’m hoping one of our friends
> at NoRedInk has experienced this issue and one of them is going to pop in
> and tell me “Oh yeah, that’s been fixed for the eventual release of 0.19.”
>
> Of possible relevance: we’re building our JavaScript bundles using Webpack
> and the elm-webpack-loader
> . We have it configured
> to run only a single instance of the Elm compiler at once, though, so I’m
> not sure how it could be responsible for this issue.
>
> Fingers crossed we’re not alone in this!
>
> --
> Kevin Yank
> Lead Developer
>
> twitter: @sentience
> skype: kevinyank
>
>
> Culture analytics for your company
> www.cultureamp.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Module intermittently missing from compiler output

2017-04-13 Thread Kevin Yank
For awhile now, we’ve been seeing intermittent issues with our build, where 
a particular module in our application will occasionally be missing from 
the JavaScript output produced by the Elm compiler. We’ve seen it happening 
both in our CI environment and when building assets for production. We have 
yet to see it happen on a development machine. As our codebase has grown, 
this issue seems to be occurring more and more often, so I thought it might 
be worth checking if anyone else in the community had experienced anything 
like it.

As I said, the problem manifests itself by a build producing a JavaScript 
output file where a particular module is simply missing. We then see an 
error like this one at runtime:

ReferenceError: Can't find variable: _user$project$Dialog$init 
http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:172568:83
ReferenceError: Can't find variable: _user$project$Dialog$init 
http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:172568:83
at 
http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:66078
ReferenceError: Can't find variable: _user$project$Dialog$init
ReferenceError: Can't find variable: _user$project$Dialog$init
at 
http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:172568
at 
http://localhost:3001/assets/exit-34cc2ad64db7cb8f54fd.bundle.js:160309 in 
A2
…


When we repeat the build, we get a JavaScript bundle that works just fine. 
Comparing the contents reveals a chunk of JavaScript corresponding to one 
of our modules is simply missing. Where the Elm compiler seems to normally 
generate a single line of whitespace between two modules’ JavaScript 
output, there is a conspicuous two-line gap at the point where the missing 
code should be. Here’s what this looks like in a diff tool:


Obviously this is a very long way from anything like a minimal test case 
that we could submit as a compiler bug, and unfortunately we can’t 
reproduce it reliably enough to be able to narrow it down.

What I’m hoping is that someone else in the community is seeing something 
like this too. Actually, if I’m being honest, I’m hoping one of our friends 
at NoRedInk has experienced this issue and one of them is going to pop in 
and tell me “Oh yeah, that’s been fixed for the eventual release of 0.19.”

Of possible relevance: we’re building our JavaScript bundles using Webpack 
and the elm-webpack-loader 
. We have it configured 
to run only a single instance of the Elm compiler at once, though, so I’m 
not sure how it could be responsible for this issue.

Fingers crossed we’re not alone in this!

--
Kevin Yank
Lead Developer

twitter: @sentience
skype: kevinyank


Culture analytics for your company
www.cultureamp.com

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.