-
Notifications
You must be signed in to change notification settings - Fork 70
Duplicate error message (esp. when pretty: true
)
#103
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
Comments
any input on this ? I am also facing this issue |
I don't get it with just any error, could you create a test repo with reproduction? Might depend on error type (typescript only, or something that would trip rollup itself) execution mode (clean build / rebuild / watch) and rollup/plugin settings. This is what I usually get:
|
Going to close this out as a reproduction was unsuccessful and this issue has not received any activity in a few years (and may not be relevant in newer versions anymore). Can re-open later if warranted on current versions and with a repro. |
So I ended up reproducing this issue while testing #372 . Per #372 (comment), the last error will indeed get printed out twice in all cases. It just happens to be a lot more visible when using Per #372 (comment), this duplication actually happens within Rollup though, and not because of this plugin. Rollup prints out the error message, and then also prints the error stack, which can actually contain the error message in it, causing duplication. This may depend on runtime though as I'll have a PR out here to workaround this in rpt2 shortly. Will also have to make a similar PR to Rollup itself to handle this upstream. The PR here will be written to be forward-compatible with newer versions of Rollup if that gets merged upstream as well. |
rollup/plugins#376 shows and mentions a "duplicated code frame" for |
pretty: true
)
This has been fixed upstream in Rollup in rollup/rollup#4749 and released in Rollup v3.7.5 |
What happens and why it is wrong
Duplicate semantic errors get logged to the console, which causes confusion. For example:
I am not entirely sure how much this is
rollup-plugin-typescript2
and how much of this is just the way rollup behaves, but I couldn't find an answer either way.Versions
The text was updated successfully, but these errors were encountered: