August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:
> 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?)
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.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to sigod | 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.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to sigod | 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.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | 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:
>> "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?
The top-level package names (std, etc and core) are currently hard-coded in rdmd.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:
> 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?)
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.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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:
>> 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?)
>
> 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.
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.
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | 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:
>> On Saturday, 23 August 2014 at 17:41:38 UTC, Dicebot wrote:
>>> 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?)
>>
>> 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.
>
> 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.
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?
|
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marc Schütz | 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. |
August 23, 2014 Re: Is this RDMD bug ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | 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: >> Isn't it better to document such things? > > Yes. Please create a pull request. 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=12986 |
Copyright © 1999-2021 by the D Language Foundation