-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup clean plugin causes noisy build errors #32
Comments
Yeah, I have seen these build errors come up as well, but didn't have the time yet to investigate. Thanks for the hint! Both alternatives are not really ideal though. Is there any way we can do this "properly". Like maybe do the build in a temporary folder, and when done move it to |
Yeah, an atomic update would probably be best. Maybe there is a rollup plugin that does that. |
This attempts to fix the problem described in embroider-build/addon-blueprint#32. While it is not the perfect solution like a truly atomic build update, it seems "good enough". Previously the cleanup would happen at the earliest point in time, at [`buildStart`](https://github.com/vladshcherbin/rollup-plugin-delete/blob/master/src/index.js#L5), making the time window large enough for Ember CLI to see the transient build output in an inconsistent state. Now it happens at the *latest* possible time, at [`generateBundle`](https://rollupjs.org/guide/en/#generatebundle) right before files are written, making the time window small enough to not cause any problems in practice.
Should be fixed by the PR above, so closing this. Should this come up again, then please reopen! |
I encountered some related problems again:
So I guess we should consider again having an atomic update eventually. Therefore re-opening this! |
Hey folks 👋 I've come across similar problems that are related to the fact that we're not doing an atomic build. Essentially if you're running I did some investigation and it doesn't seem like implementing an atomic update in Rollup is much of a priority 🤔 I couldn't find any plugins that do this for you. The closest I could find was https://www.npmjs.com/package/@mprt/rollup-plugin-incremental but I'm getting the feeling that this doesn't quite do what we are hoping for |
An idea I had to help with the issue (but not solve it), only helps out auto-import users, where we change the behavior of |
We are running increasingly into those issues at my company, so my plan is to carve out some time to work on this, both the atomic update and the ignore source files approaches, since I think both are relevant. Fyi 🙂 |
Here are two PRs for the "ignore source files" approach, ready to be reviewed:
Going to look into the atomic rollup update next week! |
I think that the
clean
we have in the rollup config causes transient-but-noisy build errors in the test-app. Because it starts the build by removing everything in dist, the test-app can rebuild and find things missing and get build and/or type errors.This seems better if you remove clean. The downside is that there is no automatic removal of build artifacts if you really do delete something from your source.
The text was updated successfully, but these errors were encountered: