Thread overview | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
August 23, 2014 Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
I have 2 reduced files, wich i can't compile with new (DMD 2.066) rdmd.exe under Windows 7 32-bit. Command: rdmd --force --build-only aaa.d Message "Error 42: Symbol Undefined _D3etc3bbb3fooFZi" But command: dmd aaa.d etc\bbb.d Compile without errors. And then i replace rdmd.exe by old (from DMD 2.065) compile OK too. Can anybody reproduce this? /*** begin of file aaa.d ***/ import etc.bbb; void main() { int i = foo(); } /***/ /*** begin of file etc\bbb.d ***/ module etc.bbb; public int foo() { return 1; } /***/ |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | On Saturday, 23 August 2014 at 16:28:46 UTC, novice2 wrote:
> I have 2 reduced files, wich i can't compile with new (DMD 2.066) rdmd.exe under Windows 7 32-bit.
>
> Command: rdmd --force --build-only aaa.d
> Message "Error 42: Symbol Undefined _D3etc3bbb3fooFZi"
>
> But command: dmd aaa.d etc\bbb.d
> Compile without errors.
> And then i replace rdmd.exe by old (from DMD 2.065) compile OK too.
>
> Can anybody reproduce this?
Yes. Looks like regression.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | On Saturday, 23 August 2014 at 16:28:46 UTC, novice2 wrote:
> I have 2 reduced files, wich i can't compile with new (DMD 2.066) rdmd.exe under Windows 7 32-bit.
>
> Command: rdmd --force --build-only aaa.d
> Message "Error 42: Symbol Undefined _D3etc3bbb3fooFZi"
>
> But command: dmd aaa.d etc\bbb.d
> Compile without errors.
> And then i replace rdmd.exe by old (from DMD 2.065) compile OK too.
>
> Can anybody reproduce this?
>
>
> /*** begin of file aaa.d ***/
> import etc.bbb;
>
> void main()
> {
> int i = foo();
> }
> /***/
>
>
> /*** begin of file etc\bbb.d ***/
> module etc.bbb;
>
> public int foo()
> {
> return 1;
> }
> /***/
Confirmed. If you change the module name everything works. i.e. change `etc` to something else.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | PR that introduced regression: https://github.com/D-Programming-Language/tools/pull/108 |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | On Saturday, 23 August 2014 at 16:28:46 UTC, novice2 wrote: > I have 2 reduced files, wich i can't compile with new (DMD 2.066) rdmd.exe under Windows 7 32-bit. > > Command: rdmd --force --build-only aaa.d > Message "Error 42: Symbol Undefined _D3etc3bbb3fooFZi" > > But command: dmd aaa.d etc\bbb.d > Compile without errors. > And then i replace rdmd.exe by old (from DMD 2.065) compile OK too. No, it is not an rdmd bug. "etc" is a standard D package name reserved for Phobos, the standard library. It is the same for "std" and "core". I was the one who introduced the change[1] which unfortunately broke your code. However, the change fixed using rdmd to compile programs which imported std.net.curl or etc.c.curl. [1]: https://github.com/D-Programming-Language/tools/pull/108 |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to sigod | On Saturday, 23 August 2014 at 17:29:15 UTC, sigod wrote: > PR that introduced regression: > https://github.com/D-Programming-Language/tools/pull/108 Filed: https://issues.dlang.org/show_bug.cgi?id=13366 |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:
> No, it is not an rdmd bug.
>
> "etc" is a standard D package name reserved for Phobos, the standard library. It is the same for "std" and "core".
Please, point us directly to a documentation where it says that this words reserved.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to sigod | On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote: > On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote: >> No, it is not an rdmd bug. >> >> "etc" is a standard D package name reserved for Phobos, the standard library. It is the same for "std" and "core". > > Please, point us directly to a documentation where it says that this words reserved. http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?) |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to sigod | On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote:
> On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:
>> No, it is not an rdmd bug.
>>
>> "etc" is a standard D package name reserved for Phobos, the standard library. It is the same for "std" and "core".
>
> Please, point us directly to a documentation where it says that this words reserved.
I don't think this limitation is documented anywhere currently. The problem is that rdmd needs a way to know which modules will be present in phobos.lib to avoid compiling and linking them twice. Currently, it considers that "std", "etc" and "core" are package names used by the standard library, not user code. The alternative would be to e.g. make rdmd contain the exact list of modules in Phobos (which is unmaintainable, and would still result in similar errors when the full module name clashes), or make rdmd check the filesystem location of each imported module (which is not trivial and may require additional configuration on non-standard D installations, thus breaking any existing ones).
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:
> "etc" is a standard D package name reserved for Phobos, the
Thanks for explanation.
I not be able to undertsand the cause - weird error message.
Now i can easy fix my code.
BTW, did rdmd determine user code or standard library by sorce file pathes?
Or it those names must be hardcoded?
|
Copyright © 1999-2021 by the D Language Foundation