-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
even lighter version of #17938: fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) #18362
Merged
Araq
merged 29 commits into
nim-lang:devel
from
timotheecour:pr_fix_used_conservative_norealmodule
Jun 26, 2021
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timotheecour
force-pushed
the
pr_fix_used_conservative_norealmodule
branch
from
June 26, 2021 02:00
84c0855
to
6e4e579
Compare
timotheecour
commented
Jun 26, 2021
Araq
reviewed
Jun 26, 2021
timotheecour
added
TODO: followup needed
remove tag once fixed or tracked elsewhere
Ready For Review
(please take another look): ready for next review round
labels
Jun 26, 2021
Clyybber
reviewed
Jun 26, 2021
I'm ok changing to a hint, given that we have hintAsError This PR generates a lot of valid warnings when compiling nim, eg:
but also a few bad ones in cases like this: import strutils except Letters
from os import nil need to followup with a PR to handle those cases => #18366 |
Araq
pushed a commit
that referenced
this pull request
Jun 27, 2021
* warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
PMunch
pushed a commit
to PMunch/Nim
that referenced
this pull request
Mar 28, 2022
…port, XDeclaredButNotUsed, etc; fix nim-lang#17511, nim-lang#17510, nim-lang#14246 (without realModule) (nim-lang#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
PMunch
pushed a commit
to PMunch/Nim
that referenced
this pull request
Mar 28, 2022
…18366) * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Ready For Review
(please take another look): ready for next review round
TODO: followup needed
remove tag once fixed or tracked elsewhere
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
{.used: symbol}
: fixes lots of issues with UnusedImport, XDeclaredButNotUsed, etc; fix #13185, #17511, #17510, #14246 #17938the main difference with #17978 is it doesn't add a
realModule
fieldfix #17511
fix #17510
fix #14246
closes #17978
future work
switch("warningAsError", "UnusedImport")
innimStrictMode
{.used: symbol}
: fixes lots of issues with UnusedImport, XDeclaredButNotUsed, etc; fix #13185, #17511, #17510, #14246 #17938