Thread overview | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 25, 2020 [Issue 19590] __traits allMembers should put fully qualified names of imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |b2.temp@gmx.com Summary|Impossible to iterate |__traits allMembers should |imported packages with |put fully qualified names |allMembers. |of imports -- |
August 25, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All Summary|__traits allMembers should |__traits allMembers should |put fully qualified names |put fully qualified names |of imports |for imports OS|Linux |All Severity|enhancement |normal -- |
August 25, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> --- @NilsLankila created dlang/dmd pull request #11627 "fix issue 19590 - `__traits allMembers` should put fully qualified names for imports" fixing this issue: - fix issue 19590 - `__traits allMembers` should put fully qualified names for imports a next step to make `allMembers` + import the more correct possible. - put imports FQN - exclude import if it is selective - displace fix for 17057 in the added code, virtual `sds.isModule()` call was executed in a loop that didn't mutate `sds` BTW https://github.com/dlang/dmd/pull/11627 -- |
August 31, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #11627 "fix issue 19590 - `__traits allMembers` should put fully qualified names for imports" was merged into master: - 0c6f0309c7dc52b55094cb3335582e02e528c499 by Nils Lankila: fix issue 19590 - `__traits allMembers` should put fully qualified names for imports a next step to make `allMembers` + import the more correct possible. - put imports FQN - exclude import if it is selective - displace fix for 17057 in the added code, virtual `sds.isModule()` call was executed in a loop that didn't mutate `sds` BTW https://github.com/dlang/dmd/pull/11627 -- |
September 17, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #11739 "Revert "fix issue 19590 - `__traits allMembers` should put fully qual…" was merged into stable: - 8b1520df59f2d0d503bf412bfec8ddf6e64f9e63 by Steven Schveighoffer: Revert "fix issue 19590 - `__traits allMembers` should put fully qualified names for imports" This reverts commit 801e841e7dc1cef01c17ee0df5adca29b8c1e1bf. https://github.com/dlang/dmd/pull/11739 -- |
October 02, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Steven Schveighoffer <schveiguy@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |schveiguy@yahoo.com Resolution|FIXED |--- --- Comment #4 from Steven Schveighoffer <schveiguy@yahoo.com> --- Fix was reverted. I've reopened for now. But I strongly believe you shouldn't see imports at all in the __traits(allMembers) result. Perhaps if they are renamed imports, because now you have a local alias for it. Is there a use case to being able to get the imports? If so, perhaps a new __traits is needed. -- |
October 05, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #5 from Basile-z <b2.temp@gmx.com> --- After thinking more about the problem, I have concluded that what should be done is to add to the AST a new Dsymbol derived class called "ImportWrapper". It would solve the problem that the information that your in the "import domain" is lost and without using the FQN trick, which did not respect the fact that a sym has a single ident. class ImportWrapper : Dsymbol { this(Ident id, ImportWrapper iw, Module m) { super(id); module_ = m; next = iw; } ImportWrapper next; Module module_; override Dsymbol search(const ref Loc loc, Identifier ident, int flags = IgnoreNone) { // if .next is assigned than return whether (next.identifier == ident) // if .module_ is assisgned then forward result of module_.search() } } so that for `import std.algorithm;` `allMembers` can include "std", just as now but `getMember` on this "std" gives an ImportWrapper instance that has no `.module_` but a `.next`. `allMember` on "std" can return "algorithm". This way partial import in the chain is not lost and sub modules that are not imported by the ImportStatement are not visible. -- |
October 09, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=20008 -- |
October 09, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |bugzilla@digitalmars.com -- |
October 09, 2020 [Issue 19590] __traits allMembers should put fully qualified names for imports | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #6 from Adam D. Ruppe <destructionator@gmail.com> --- I'm of the opinion that modules are not members of anything and should thus NEVER appear in __traits(allMembers). A new trait should be added for imports. A module name should also ALWAYS be given as its proper, full name, NEVER truncated. -- |
Copyright © 1999-2021 by the D Language Foundation