Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 02, 2014 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Martin Nowak <code@dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code@dawg.eu --- Comment #5 from Martin Nowak <code@dawg.eu> --- I agree with Söhnke here, it should still be possible to import submodules and it should also be possible to use fully qualified names. -- |
June 02, 2014 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #6 from Jonathan M Davis <jmdavisProg@gmx.com> --- I also agree with Sönke. There should be no difference between publicly imported modules in package.d and publicly imported modules in any other module. All package.d should be doing is making it so that when you import the package, you import package.d instead. It shouldn't have any other effects. import test; import test.mod; should work just as well as import std.array; import std.range; does. std.array.uninitializedArray doesn't suddenly stop working just because you also imported std.range, which publicly imports std.array. -- |
June 02, 2014 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 --- Comment #7 from Jonathan M Davis <jmdavisProg@gmx.com> --- Also, keep in mind that the whole reason to add package.d to the language in the first place was to be able to break up a module into a package, in which case, it's intended as a migration path and not necessarily as something permanent, so making it so that importing a package conflicts with importing its individual modules is very likely to cause problems - especially if new modules with code that wasn't in the original module that was split are added after it's been split (since they likely wouldn't be publicly imported in the package.d file, because that's unnecessary for migration). -- |
June 24, 2014 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 sigod <sigod.mail@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sigod.mail@gmail.com -- |
May 12, 2015 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Nick Sabalausky <cbkbbejeap@mailinator.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbkbbejeap@mailinator.com --- Comment #8 from Nick Sabalausky <cbkbbejeap@mailinator.com> --- I've hit this problem too, and it's a pain in the ass. It makes it nearly impossible to resolve a symbol ambiguity whenever a package.d is involved. It effectively destroys the ability for "package.d" to do it's primary intended job: Let module authors break up a module without breaking user code. This needs fixed. -- |
February 23, 2017 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 ZombineDev <petar.p.kirov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |petar.p.kirov@gmail.com -- |
April 10, 2017 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Maksim Zholudev <maximzms@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maximzms@gmail.com --- Comment #9 from Maksim Zholudev <maximzms@gmail.com> --- A fragment of `dub test` output for my main project: -------------------- Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 -------------------- If this is "by design" then 1) it should be justified 2) it should be documented 3) tools should stop complaining about it (or stop doing this with so many identical lines) Otherwise it is a bug. -- |
July 16, 2017 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 --- Comment #10 from cpierrot273@gmail.com --- I have found out that renamed imports in the can be used as a workaround: test/package.d --- module test; import mod = test.mod; --- test/mod.d --- module test.mod; import std.stdio; void func(){writeln("hello world");} --- main.d --- import test; import test.mod; void main() { func(); } --- compiled and worked as expected (prints "hello world") -- |
July 21, 2017 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=8855 -- |
July 26, 2017 [Issue 11847] Importing "package.d" module causes qualified name lookup to fail for sub modules | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=11847 Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andre@s-e-a-p.de --- Comment #11 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- *** Issue 17683 has been marked as a duplicate of this issue. *** -- |
Copyright © 1999-2021 by the D Language Foundation