digitalmars.D.learn - Is this RDMD bug ?
- novice2 (23/23) Aug 23 2014 I have 2 reduced files, wich i can't compile with new (DMD 2.066)
- sigod (2/11) Aug 23 2014 Yes. Looks like regression.
- Gary Willoughby (3/26) Aug 23 2014 Confirmed. If you change the module name everything works. i.e.
- sigod (2/2) Aug 23 2014 PR that introduced regression:
- Gary Willoughby (2/4) Aug 23 2014 Filed: https://issues.dlang.org/show_bug.cgi?id=13366
- Vladimir Panteleev (8/16) Aug 23 2014 No, it is not an rdmd bug.
- sigod (4/7) Aug 23 2014 Please, point us directly to a documentation where it says that
- Dicebot (4/12) Aug 23 2014 http://dlang.org/phobos/ ?
- sigod (13/26) Aug 23 2014 Actually, I never got to use this names for first package name.
- Vladimir Panteleev (2/3) Aug 23 2014 Yes. Please create a pull request.
- sigod (5/8) Aug 23 2014 Easy to say. In my TODO list lies record to create PR for [this
-
Vladimir Panteleev
(4/7)
Aug 23 2014
`
.etc` and ` .core` should work fine. Only - "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (6/19) Aug 23 2014 Why not? If I want to amend the standard library, e.g. for
- Vladimir Panteleev (5/25) Aug 23 2014 For the record, rdmd handles this particular case just fine. You
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (8/34) Aug 23 2014 But imported modules are the important case. If I have an
- Vladimir Panteleev (4/10) Aug 23 2014 Rebuild Phobos. If rdmd were to compile your module, linking
- Vladimir Panteleev (12/20) Aug 23 2014 I don't think this limitation is documented anywhere currently.
- novice2 (8/9) Aug 23 2014 Thanks for explanation.
- Vladimir Panteleev (3/12) Aug 23 2014 The top-level package names (std, etc and core) are currently
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; } /***/
Aug 23 2014
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.
Aug 23 2014
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.
Aug 23 2014
PR that introduced regression: https://github.com/D-Programming-Language/tools/pull/108
Aug 23 2014
On Saturday, 23 August 2014 at 17:29:15 UTC, sigod wrote:PR that introduced regression: https://github.com/D-Programming-Language/tools/pull/108Filed: https://issues.dlang.org/show_bug.cgi?id=13366
Aug 23 2014
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
Aug 23 2014
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.
Aug 23 2014
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:http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?)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.
Aug 23 2014
On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote:Actually, I never got to use this names for first package name. (I only used `<something>.etc` and `<something>.core`.) So, I didn't thought about this. But, if to think about it know: `std` - no. `core` - yes. `etc` - yes. It isn't documented. So, why should I think that this is reserved package names? Actually, I myself never thought that there's exist such thing as "reserved package name". Isn't it better to document such things? Less questions will arouse. Less users will stumble on strange errors.On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?)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.
Aug 23 2014
On Saturday, 23 August 2014 at 18:23:25 UTC, sigod wrote:Isn't it better to document such things?Yes. Please create a pull request.
Aug 23 2014
On Saturday, 23 August 2014 at 18:28:32 UTC, Vladimir Panteleev wrote:On Saturday, 23 August 2014 at 18:23:25 UTC, sigod wrote:Easy to say. In my TODO list lies record to create PR for [this issue][0]. Today is exactly 2 months as it was created. [0]: https://issues.dlang.org/show_bug.cgi?id=12986Isn't it better to document such things?Yes. Please create a pull request.
Aug 23 2014
On Saturday, 23 August 2014 at 18:23:25 UTC, sigod wrote:Actually, I never got to use this names for first package name. (I only used `<something>.etc` and `<something>.core`.) So, I didn't thought about this.`<something>.etc` and `<something>.core` should work fine. Only the three top-level package names are reserved by rdmd for Phobos/Druntime.
Aug 23 2014
On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote:Why not? If I want to amend the standard library, e.g. for testing a module that's not yet present in my compiler version, or for fixing an error? I think it's useful to be able to override individual modules by placing a copy of them into your project's directory.On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?)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.
Aug 23 2014
On Saturday, 23 August 2014 at 18:41:58 UTC, Marc Schütz wrote:On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:For the record, rdmd handles this particular case just fine. You can run unit tests on any one Phobos module with "rdmd -main -unittest module.d". The package exclusion list only applies to imported modules.On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote:Why not? If I want to amend the standard library, e.g. for testing a module that's not yet present in my compiler version, or for fixing an error? I think it's useful to be able to override individual modules by placing a copy of them into your project's directory.On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?)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.
Aug 23 2014
On Saturday, 23 August 2014 at 18:43:35 UTC, Vladimir Panteleev wrote:On Saturday, 23 August 2014 at 18:41:58 UTC, Marc Schütz wrote:But imported modules are the important case. If I have an important bugfix in a module, and don't want to wait for the next release, what am I supposed to do? I don't know how rdmd works exactly, but AFAICS `dmd -deps` already outputs the full paths of the imported files, recursively. Isn't that enough?On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:For the record, rdmd handles this particular case just fine. You can run unit tests on any one Phobos module with "rdmd -main -unittest module.d". The package exclusion list only applies to imported modules.On Saturday, 23 August 2014 at 17:37:39 UTC, sigod wrote:Why not? If I want to amend the standard library, e.g. for testing a module that's not yet present in my compiler version, or for fixing an error? I think it's useful to be able to override individual modules by placing a copy of them into your project's directory.On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:http://dlang.org/phobos/ ? (you don't expect to casually use package names "std" and "core" either, do you?)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.
Aug 23 2014
On Saturday, 23 August 2014 at 18:55:08 UTC, Marc Schütz wrote:But imported modules are the important case. If I have an important bugfix in a module, and don't want to wait for the next release, what am I supposed to do?Rebuild Phobos. If rdmd were to compile your module, linking would fail due to duplicate symbols.I don't know how rdmd works exactly, but AFAICS `dmd -deps` already outputs the full paths of the imported files, recursively. Isn't that enough?rdmd also needs to know which directory contains Phobos sources.
Aug 23 2014
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: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).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.
Aug 23 2014
On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:"etc" is a standard D package name reserved for Phobos, theThanks 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?
Aug 23 2014
On Saturday, 23 August 2014 at 18:12:44 UTC, novice2 wrote:On Saturday, 23 August 2014 at 17:32:15 UTC, Vladimir Panteleev wrote:The top-level package names (std, etc and core) are currently hard-coded in rdmd."etc" is a standard D package name reserved for Phobos, theThanks 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?
Aug 23 2014