-
-
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
light version of #17938: fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 #17978
light version of #17938: fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 #17978
Conversation
Sooner or later, I think it might be prudent to have a |
Here is how it should be done instead: For |
We already have an |
4add9ac
to
570826a
Compare
PTAL, rebased after bitrot conflicts
I'm already doing that, createModuleAlias is always called for imports and creates a PSym copy EDIT:
(the other errors are the same) |
570826a
to
7e4a96d
Compare
PTAL: it turns out the |
trying another PR without realModule here: #18362 |
refs #17938 (comment), this PR is a light weight version of #17938, removing these:
{.used: symbol.}
--import:mymodule
#13185genPNode
ie, it does the following:
import foo
vsimport foo as foo2
both callcreateModuleAliasImpl
; this allows keeping module modifications (egmoduleSym.flags
) isolated from the actual imported moduleUnusedImport
warning in presence ofimport foo as bar
#17511, see [1]DuplicateModuleImport
that triggers for eg onimport foo; import foo
import foo as bar
would not show deprecation msg for foo (before PR, onlyimport foo
would show the deprecation msg), eg with{.deprecated: "blah".}
UnusedImport
warnings regression from 1.4.2 to 1.5.1 #17510UnusedImport
warning with re-exported symbols or withtyAlias
(type Foo* = Bar
) #14246nimoutFull
which is critical for this kind of testnote
UnusedImport
warning in presence ofimport foo as bar
#17511 has 2 components A and B, I'm fixing both:A is the
test.nim(1, 17) Warning: imported and not used: 'sequtils' [UnusedImport]
(warning in the imported module referring to:B is the 2nd warning
test2.nim(1, 11) Warning: imported and not used: 'test' [UnusedImport]
which is a regression