Skip to content
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

Add locations to logs, warnings and error messages #5424

Merged
merged 1 commit into from Mar 12, 2024

Conversation

lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented Mar 10, 2024

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

As we keep getting issues that Rollup does not tell you the location of warnings and errors when run through tools like Vite, this PR will automatically extend all error, warning and log messages that have a location and/or a plugin to also mention this in their error message, e.g.

[plugin test] main.js (1:0): Some error occurred

instead of just

Some error occurred

Copy link

vercel bot commented Mar 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 4:39pm

Copy link

github-actions bot commented Mar 10, 2024

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#add-log-locations

Notice: Ensure you have installed Rust nightly. If you haven't installed it yet, please first see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust, then see https://rust-lang.github.io/rustup/concepts/channels.html to learn how to install Rust nightly.

or load it into the REPL:
https://rollup-ncluf8qqj-rollup-js.vercel.app/repl/?pr=5424

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (10bdaa3) to head (53d5b1c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5424   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files         236      236           
  Lines        9418     9423    +5     
  Branches     2396     2398    +2     
=======================================
+ Hits         9305     9310    +5     
  Misses         48       48           
  Partials       65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lukastaegert lukastaegert merged commit 341d987 into master Mar 12, 2024
28 checks passed
@lukastaegert lukastaegert deleted the add-log-locations branch March 12, 2024 05:15
Copy link

This PR has been released as part of rollup@4.13.0. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Advise which file failed to be transformed when RollupError: Unexpected character occurs
1 participant