Throw on rollup build warnings - #2016
Conversation
|
I'm strongly against this actually. I think Rollup already can be a little fickle to get a build working with NodeJS workflows, and the solution to that is to make NodeJS workflows easier not harder. I'd like to work towards a place where we have a reliable NodeJS plugin that handles all builtins transparently and does everything one would expect as in Browserify. My current goal is to provide a new Also note that some circular warnings are unavoidable when building eg Node streams which are third-party circular references by design that users can't necessarily control. If something like that could remove these problems, what remaining rationale would there be for having all warnings throw? |
|
I think you totally misunderstand this PR. This is just about our internal workflow. This will change NOTHING for users of rollup. The core change is basically a change to our internal |
|
Also, I have no intention to break builds for other users. That would be horrible indeed. This is just for us. |
|
guybedford
left a comment
There was a problem hiding this comment.
Ahh I see, yes I completely misunderstood this was just for our build!
Interface refactorings seem nice too.
|
Thanks 😉👍 |
|
Also I really like that idea of a |
This PR will throw if building rollup itself displays a warning.
In the past, we often had issues with PRs that accidentally introduced external dependencies (usually node builtins) into the browser build. The main reason was that warnings in the build process were easily overlooked. This is now changed by throwing an error in these situations that will prevent a successful build until all warnings are fixed.
Errors will be thrown for any kind of warnings, including circular dependencies. To make this possible, some definitions had to be moved around to resolve the existing circles. Should there ever be a situation where circular dependencies cannot be avoided, I would suggest to add an exception to the
onwarnhandler. However I would find it preferable to avoid them altogether as they can always be an indication of architectural problems.