Closed anagrius closed 6 years ago
@anagrius I believe this has been introduced by #30. I can reproduce your problem (both with and without the --production flag) with version 0.9.0 (which contains #30) but not with 0.7.0 (which does not contain #30).
I therefore suggest trying version 0.7.0.
@chazsconi Great Catch. @madsflensted this is a major deal. For us it means that even if you have compile errors while developing Brunch Succeeds and presents a working site (You don't get a compile error notification) and thus you don't notice the issue. For the CI, you don't get any build error. :.(
Published v 0.10.0 wich reverts PR30. Can you check if this resolves this issue?
I can confirm that that did it. Both notifications and Error code is back to normal! 🎉
@madsflensted It seems 0.10.0 introduces race condition in dependency resolution. It seems to try to compile the code before the dependencies have finished downloading. This leads to situations where you have to delete elm-stuff/. If you on the other hand say elm package install
before running brunch, everything works.
@anagrius I cannot reproduce this problem with 0.10.0. When I delete my elm-stuff
folder and then run brunch build
it pauses at the compile step of each Elm file while it downloads the dependencies.
Can you reproduce it with 0.7.0?
When the problem happens and the compilation fails, does it return a non-zero exit code?
Does it only happen with the --production
flag?
@chazsconi I have all kinds of problems now. Our project is about 50k lines of Elm, that might be what is causing the race condition. I don't only experience problems with dependencies, also random compile errors that go away after a restart of brunch. I will try out 0.7.0
@anagrius I am going to close this issue as your current problem seems to be a different type. If you find that it is caused by a problem in elm-brunch please raise a new issue.
In your CI setup you could try to run the elm make separate from brunch. Also check if you have any kind of parallelization enabled.
@madsflensted I am not sure what you mean about my current problem? After the update to 0.10.0 elm-brunch is very broken. Have you rolled back? If not you should do so.
@anagrius For me 0.9.0 was broken and 0.10.0 is working fine. Did you try on 0.7.0 yet?
As @madsflensted says it would be better to open a new issue for the problem you are experiencing.
@anagrius I just did a test using src from [https://github.com/rtfeldman/elm-spa-example] and this brunch-config.js:
module.exports = {
files: {
javascripts: {joinTo: 'app.js'},
stylesheets: {joinTo: 'app.css'},
},
paths: {
watched: ["src"]
},
plugins: {
elmBrunch: { mainModules: ['src/Main.elm'],
outputFile: 'elm.js',
makeParameters: ['--warn']
}
}
};
Using 0.10.0 brunch build --production
works fine.
If you can pin point it closer then feel free to open a new issue.
--production works fine now. But watch is broken for us. I have opened a new issue #39. Sorry about the delay... too busy writing Elm code. :)
Problem
brunch build --production
does not have a non-zero status code when there is an error in Elm code. If you on the other hand introduce an error in, say a JavaScript, it will return exit code1
.This means our build server does not notice errors in Elm code. Which is bad :(
Information