Skip to content

Add locations to logs, warnings and error messages#5424

Merged
lukastaegert merged 1 commit intomasterfrom
add-log-locations
Mar 12, 2024
Merged

Add locations to logs, warnings and error messages#5424
lukastaegert merged 1 commit intomasterfrom
add-log-locations

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

@vercel
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

@github-actions
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

@codecov
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.

@github-actions
Copy link

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

ychavoya added a commit to ychavoya/rollup-plugins that referenced this pull request Mar 6, 2026
ychavoya added a commit to ychavoya/rollup-plugins that referenced this pull request Mar 9, 2026
ychavoya added a commit to ychavoya/rollup-plugins that referenced this pull request Mar 9, 2026
See rollup/rollup#5424

test(typescript): update test to not have declare type
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