Jump to page: 1 2
Thread overview
Removing ddmd. prefix from dmd module names
Nov 10, 2016
Walter Bright
Nov 10, 2016
Rikki Cattermole
Nov 10, 2016
Dicebot
Nov 20, 2016
Mathias Lang
Nov 10, 2016
ketmar
Nov 10, 2016
Mathias Lang
Nov 10, 2016
Vladimir Panteleev
Nov 27, 2016
Walter Bright
Nov 28, 2016
Dicebot
Nov 28, 2016
Walter Bright
Nov 28, 2016
Sebastien Alaiwan
Nov 28, 2016
Walter Bright
Nov 28, 2016
Dicebot
Nov 28, 2016
Walter Bright
Nov 28, 2016
Mathias Lang
Nov 28, 2016
Walter Bright
Nov 28, 2016
Jacob Carlborg
Nov 28, 2016
Walter Bright
November 09, 2016
The dmd build has a problem - all the .d files have to be specified on the same command line. The trouble is the prefix ddmd. on all the imports, yet there is no ddmd directory. D is designed to have the path/file structure match the package/module structure.

  https://github.com/dlang/dmd/pull/6249

illustrates the change. Another option is to move the files into a subdirectory named 'ddmd'.

It's worth some wider discussion.
November 10, 2016
On Thursday, 10 November 2016 at 07:44:08 UTC, Walter Bright wrote:
> The dmd build has a problem - all the .d files have to be specified on the same command line. The trouble is the prefix ddmd. on all the imports, yet there is no ddmd directory. D is designed to have the path/file structure match the package/module structure.
>
>   https://github.com/dlang/dmd/pull/6249
>
> illustrates the change. Another option is to move the files into a subdirectory named 'ddmd'.
>
> It's worth some wider discussion.

Another option is to get around to making the frontend actually fully separate in the directory structure to the backend.

E.g.

src/dlang/frontend/
src/dlang/backend/
src/dlang/mars.d

import dlang.frontend.apply;

It would be the first stage of actually making the frontend actually palatable to us end developers.
November 10, 2016
On Thursday, 10 November 2016 at 07:44:08 UTC, Walter Bright wrote:
> The dmd build has a problem - all the .d files have to be specified on the same command line. The trouble is the prefix ddmd. on all the imports, yet there is no ddmd directory. D is designed to have the path/file structure match the package/module structure.
>
>   https://github.com/dlang/dmd/pull/6249
>
> illustrates the change. Another option is to move the files into a subdirectory named 'ddmd'.
>
> It's worth some wider discussion.

i think that moving to ddmd/ is better. it is good to have compiler in it's own namespace (ddmd.). even in the current state some compiler parts can be reused in other projects, and polluting "root" namespace or forcing people to manually patch the code each time doesn't look as a good solution for me.
November 10, 2016
On Thursday, 10 November 2016 at 07:44:08 UTC, Walter Bright wrote:
> The dmd build has a problem - all the .d files have to be specified on the same command line. The trouble is the prefix ddmd. on all the imports, yet there is no ddmd directory. D is designed to have the path/file structure match the package/module structure.
>
>   https://github.com/dlang/dmd/pull/6249
>
> illustrates the change. Another option is to move the files into a subdirectory named 'ddmd'.
>
> It's worth some wider discussion.

Thanks for bringing the topic up.
Linking for the issue where the discussion started, for reference: https://issues.dlang.org/show_bug.cgi?id=16071

I would much rather go with the second solution, that is, move the files from `src/` to `src/ddmd/`.

That will prevent some silly conflicts you can see with un-packaged modules. One bug we witnessed during the D2 porting is for example that any module which has the same name as one of it's symbol (in our case, `Version.Version`) is unusable if the module is imported unqualified, because the module itself is a symbol.
November 10, 2016
On Thursday, 10 November 2016 at 07:44:08 UTC, Walter Bright wrote:
> It's worth some wider discussion.

Some previous discussion here:

https://github.com/dlang/dmd/pull/6217
November 10, 2016
On 11/10/2016 09:47 AM, Rikki Cattermole wrote:
> Another option is to get around to making the frontend actually fully separate in the directory structure to the backend.
> 
> E.g.
> 
> src/dlang/frontend/
> src/dlang/backend/
> src/dlang/mars.d
> 
> import dlang.frontend.apply;
> 
> It would be the first stage of actually making the frontend actually palatable to us end developers.

I am in favor of this approach, shorter `dmd.fe` and `dmd.be` would be just fine. It is weird to have package names based on implementations details and not semantical purpose.



November 20, 2016
On Thursday, 10 November 2016 at 13:19:52 UTC, Dicebot wrote:
> On 11/10/2016 09:47 AM, Rikki Cattermole wrote:
>> Another option is to get around to making the frontend actually fully separate in the directory structure to the backend.
>> 
>> E.g.
>> 
>> src/dlang/frontend/
>> src/dlang/backend/
>> src/dlang/mars.d
>> 
>> import dlang.frontend.apply;
>> 
>> It would be the first stage of actually making the frontend actually palatable to us end developers.
>
> I am in favor of this approach, shorter `dmd.fe` and `dmd.be` would be just fine. It is weird to have package names based on implementations details and not semantical purpose.

I would favor this even more, but AFAIR Walter was against using packages in DMD:
https://github.com/dlang/dmd/pull/5730#issuecomment-224069664

It's been 10 days without comment. What critera would lead to a resolution (do we need more comments or more time ?)
November 27, 2016
On 11/9/2016 11:44 PM, Walter Bright wrote:
> The dmd build has a problem - all the .d files have to be specified on the same
> command line. The trouble is the prefix ddmd. on all the imports, yet there is
> no ddmd directory. D is designed to have the path/file structure match the
> package/module structure.
>
>   https://github.com/dlang/dmd/pull/6249
>
> illustrates the change. Another option is to move the files into a subdirectory
> named 'ddmd'.
>
> It's worth some wider discussion.

I came up with another solution that does not require any source code changes:

https://issues.dlang.org/show_bug.cgi?id=16798
https://github.com/dlang/dmd/pull/6286
November 28, 2016
On 11/28/2016 01:15 AM, Walter Bright wrote:
> On 11/9/2016 11:44 PM, Walter Bright wrote:
>> The dmd build has a problem - all the .d files have to be specified on
>> the same
>> command line. The trouble is the prefix ddmd. on all the imports, yet
>> there is
>> no ddmd directory. D is designed to have the path/file structure match
>> the
>> package/module structure.
>>
>>   https://github.com/dlang/dmd/pull/6249
>>
>> illustrates the change. Another option is to move the files into a
>> subdirectory
>> named 'ddmd'.
>>
>> It's worth some wider discussion.
> 
> I came up with another solution that does not require any source code changes:
> 
> https://issues.dlang.org/show_bug.cgi?id=16798 https://github.com/dlang/dmd/pull/6286

In this specific case "and refactoring the package/module names is undesirable for various reasons" is not truly relevant - refactoring of dmd package stucture IS much desirable on its own even if there are no other reasons to do so.

Interesting idea though.



November 27, 2016
On 11/27/2016 6:11 PM, Dicebot wrote:
> On 11/28/2016 01:15 AM, Walter Bright wrote:
>> https://issues.dlang.org/show_bug.cgi?id=16798
>> https://github.com/dlang/dmd/pull/6286
>
> In this specific case "and refactoring the package/module names is
> undesirable for various reasons" is not truly relevant - refactoring of
> dmd package stucture IS much desirable on its own even if there are no
> other reasons to do so.

The thing is, I also want to convert the dmd back end to D, and continue using it as a back end for DMC++. Some people want to use various parts of dmd for libraries.

Trying to push everything into the same file structure is not impossible, but rather disruptive.

Having this new switch means that users can independently adjust the file structure as they see fit on their own time schedule.

« First   ‹ Prev
1 2