Skip to content

Align batch warning for UNUSED_EXTERNAL_IMPORT to individual warning#4194

Merged
lukastaegert merged 7 commits intorollup:masterfrom
benmccann:better-warning
Jul 29, 2021
Merged

Align batch warning for UNUSED_EXTERNAL_IMPORT to individual warning#4194
lukastaegert merged 7 commits intorollup:masterfrom
benmccann:better-warning

Conversation

@benmccann
Copy link
Copy Markdown
Contributor

@benmccann benmccann commented Jul 28, 2021

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:

The original issue which was closed is #4052. This finishes addressing that issue

Description

PR #4054 improved the individual warning, but did not update the batch warning. When I build SvelteKit with Vite, which uses Rollup, I get a warning that I can't understand the origin of or how to fix

After using a locally modified copy, I was quickly able to track down the culprit: ampproject/amphtml#35435

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 28, 2021

Codecov Report

Merging #4194 (ec2ac8f) into master (e88c5c8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4194   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         202      202           
  Lines        7243     7244    +1     
  Branches     2123     2123           
=======================================
+ Hits         7123     7124    +1     
  Misses         58       58           
  Partials       62       62           
Impacted Files Coverage Δ
cli/run/batchWarnings.ts 99.20% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e88c5c8...ec2ac8f. Read the comment docs.

Copy link
Copy Markdown
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice addition, just a small potential cleanup (that should also fix coverage).

Comment thread cli/run/batchWarnings.ts Outdated
stderr,
'(!) Unused external imports\n' +
"default imported from external module 'external' but never used\n"
`default imported from external module 'external' but never used in "main.js"\n`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, maybe we could align on using double quotes " also for the module name. This is also what most other errors use.

Copy link
Copy Markdown
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

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.

2 participants