Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circleci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ coverage() {

# rebuild dmd with coverage enabled
# use the just build dmd as host compiler this time
mv src/dmd src/host_dmd
mv generated/dmd src/host_dmd
Copy link
Contributor

@wilzbach wilzbach Feb 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK a lot of stuff depends on src/dmd (e.g. all Makefiles in the dlang repo)

https://github.com/dlang/druntime/blob/master/posix.mak#L24
https://github.com/dlang/phobos/blob/master/posix.mak#L90
https://github.com/dlang/dlang.org/blob/master/posix.mak#L22

(and of course equivalently for Windows)

edit: as for example can be seen by the failing auto-tester ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if this PR goes further all the scripts in the dlang repo must be updated. Is this hard to accomplish?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if this PR goes further all the scripts in the dlang repo must be updated. Is this hard to accomplish?

Well, as mentioned this only applies if we go with dmd as module name (for ddmd there's no conflict).
Moreover as you have seen the auto-tester clones all three repos, so you would need to go in three steps:

  1. DMD: Create a new Makefile target that exposed generated/dmd
  2. For all depending repos: send PRs to switch from src/dmd to generated/dmd
  3. Merge this PR

Btw another workaround would be to use source instead of src (you can then softly deprecate src/dmd). As @ZombineDev pointed out source` is the DUB default folder for source code files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if this PR goes further all the scripts in the dlang repo must be updated. Is this hard to accomplish?

It's quite a lot of script. And that's only for the visible part, some people might rely on it without you knowing.
Also this change is not a one time cost: for example Digger has to know where the binary lives, so if it's a hard switch it will have to be hard-coded somehow.
I would recommend to have both running side-by-side: First generate all binaries / temp files in a separate folder, and copy over generated/dmd to src/dmd. Adjust other places, and let a bit of time pass before changing dmd source folder.

I know it's a pain for you, but it will ease the transition for everyone.

make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=./host_dmd clean
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=./host_dmd dmd.conf
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=./host_dmd ENABLE_COVERAGE=1
Expand Down
30 changes: 15 additions & 15 deletions src/access.d → src/dmd/access.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
* Source: $(DMDSRC _access.d)
*/

module ddmd.access;
module dmd.access;

import ddmd.aggregate;
import ddmd.dclass;
import ddmd.declaration;
import ddmd.dmodule;
import ddmd.dscope;
import ddmd.dstruct;
import ddmd.dsymbol;
import ddmd.errors;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.mtype;
import ddmd.tokens;
import dmd.aggregate;
import dmd.dclass;
import dmd.declaration;
import dmd.dmodule;
import dmd.dscope;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.mtype;
import dmd.tokens;

private enum LOG = false;

Expand Down Expand Up @@ -589,7 +589,7 @@ private Dsymbol mostVisibleOverload(Dsymbol s)
break;
}
}
// handled by ddmd.func.overloadApply for unknown reason
// handled by dmd.func.overloadApply for unknown reason
assert(next !is ad); // should not alias itself
assert(next !is fstart); // should not alias the overload list itself
}
Expand Down
34 changes: 17 additions & 17 deletions src/aggregate.d → src/dmd/aggregate.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@
* Source: $(DMDSRC _aggregate.d)
*/

module ddmd.aggregate;
module dmd.aggregate;

import core.stdc.stdio;
import core.checkedint;

import ddmd.arraytypes;
import ddmd.gluelayer;
import ddmd.declaration;
import ddmd.dscope;
import ddmd.dstruct;
import ddmd.dsymbol;
import ddmd.dtemplate;
import ddmd.errors;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.id;
import ddmd.identifier;
import ddmd.mtype;
import ddmd.tokens;
import ddmd.visitor;
import dmd.arraytypes;
import dmd.gluelayer;
import dmd.declaration;
import dmd.dscope;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.id;
import dmd.identifier;
import dmd.mtype;
import dmd.tokens;
import dmd.visitor;

enum Sizeok : int
{
Expand Down
26 changes: 13 additions & 13 deletions src/aliasthis.d → src/dmd/aliasthis.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
* Source: $(DMDSRC _aliasthis.d)
*/

module ddmd.aliasthis;
module dmd.aliasthis;

import core.stdc.stdio;
import ddmd.aggregate;
import ddmd.declaration;
import ddmd.dscope;
import ddmd.dsymbol;
import ddmd.errors;
import ddmd.expression;
import ddmd.globals;
import ddmd.identifier;
import ddmd.mtype;
import ddmd.opover;
import ddmd.tokens;
import ddmd.visitor;
import dmd.aggregate;
import dmd.declaration;
import dmd.dscope;
import dmd.dsymbol;
import dmd.errors;
import dmd.expression;
import dmd.globals;
import dmd.identifier;
import dmd.mtype;
import dmd.opover;
import dmd.tokens;
import dmd.visitor;

/***********************************************************
* alias ident this;
Expand Down
10 changes: 5 additions & 5 deletions src/apply.d → src/dmd/apply.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* Source: $(DMDSRC _apply.d)
*/

module ddmd.apply;
module dmd.apply;

import ddmd.arraytypes;
import ddmd.dtemplate;
import ddmd.expression;
import ddmd.visitor;
import dmd.arraytypes;
import dmd.dtemplate;
import dmd.expression;
import dmd.visitor;

/**************************************
* An Expression tree walker that will visit each Expression e in the tree,
Expand Down
10 changes: 5 additions & 5 deletions src/argtypes.d → src/dmd/argtypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* Source: $(DMDSRC _argtypes.d)
*/

module ddmd.argtypes;
module dmd.argtypes;

import core.stdc.stdio;
import ddmd.declaration;
import ddmd.globals;
import ddmd.mtype;
import ddmd.visitor;
import dmd.declaration;
import dmd.globals;
import dmd.mtype;
import dmd.visitor;

/****************************************************
* This breaks a type down into 'simpler' types that can be passed to a function
Expand Down
30 changes: 15 additions & 15 deletions src/arrayop.d → src/dmd/arrayop.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
* Source: $(DMDSRC _arrayop.d)
*/

module ddmd.arrayop;
module dmd.arrayop;

import core.stdc.stdio;
import ddmd.arraytypes;
import ddmd.declaration;
import ddmd.dscope;
import ddmd.dsymbol;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.id;
import ddmd.identifier;
import ddmd.mtype;
import ddmd.root.outbuffer;
import ddmd.statement;
import ddmd.tokens;
import ddmd.visitor;
import dmd.arraytypes;
import dmd.declaration;
import dmd.dscope;
import dmd.dsymbol;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.id;
import dmd.identifier;
import dmd.mtype;
import dmd.root.outbuffer;
import dmd.statement;
import dmd.tokens;
import dmd.visitor;

/**************************************
* Hash table of array op functions already generated or known about.
Expand Down
28 changes: 14 additions & 14 deletions src/arraytypes.d → src/dmd/arraytypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
* Source: $(DMDSRC _arraytypes.d)
*/

module ddmd.arraytypes;
module dmd.arraytypes;

import ddmd.dclass;
import ddmd.declaration;
import ddmd.dmodule;
import ddmd.dsymbol;
import ddmd.dtemplate;
import ddmd.expression;
import ddmd.func;
import ddmd.identifier;
import ddmd.init;
import ddmd.mtype;
import ddmd.root.array;
import ddmd.root.rootobject;
import ddmd.statement;
import dmd.dclass;
import dmd.declaration;
import dmd.dmodule;
import dmd.dsymbol;
import dmd.dtemplate;
import dmd.expression;
import dmd.func;
import dmd.identifier;
import dmd.init;
import dmd.mtype;
import dmd.root.array;
import dmd.root.rootobject;
import dmd.statement;

alias Strings = Array!(const(char)*);
alias Identifiers = Array!(Identifier);
Expand Down
64 changes: 32 additions & 32 deletions src/asttypename.d → src/dmd/asttypename.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@
* Source: $(DMDSRC _asttypename.d)
*/

module ddmd.asttypename;
module dmd.asttypename;

import ddmd.attrib;
import ddmd.aliasthis;
import ddmd.aggregate;
import ddmd.complex;
import ddmd.cond;
import ddmd.ctfeexpr;
import ddmd.dclass;
import ddmd.declaration;
import ddmd.denum;
import ddmd.dimport;
import ddmd.declaration;
import ddmd.dstruct;
import ddmd.dsymbol;
import ddmd.dtemplate;
import ddmd.dversion;
import ddmd.expression;
import ddmd.func;
import ddmd.denum;
import ddmd.dimport;
import ddmd.dmodule;
import ddmd.mtype;
import ddmd.typinf;
import ddmd.identifier;
import ddmd.init;
import ddmd.doc;
import ddmd.root.rootobject;
import ddmd.statement;
import ddmd.staticassert;
import ddmd.nspace;
import ddmd.visitor;
import dmd.attrib;
import dmd.aliasthis;
import dmd.aggregate;
import dmd.complex;
import dmd.cond;
import dmd.ctfeexpr;
import dmd.dclass;
import dmd.declaration;
import dmd.denum;
import dmd.dimport;
import dmd.declaration;
import dmd.dstruct;
import dmd.dsymbol;
import dmd.dtemplate;
import dmd.dversion;
import dmd.expression;
import dmd.func;
import dmd.denum;
import dmd.dimport;
import dmd.dmodule;
import dmd.mtype;
import dmd.typinf;
import dmd.identifier;
import dmd.init;
import dmd.doc;
import dmd.root.rootobject;
import dmd.statement;
import dmd.staticassert;
import dmd.nspace;
import dmd.visitor;

/// Returns: the typename of the dynamic ast-node-type
/// (this is a development tool, do not use in actual code)
Expand Down Expand Up @@ -107,7 +107,7 @@ public :
///
unittest
{
import ddmd.globals : Loc;
import dmd.globals : Loc;
Expression e = new TypeidExp(Loc.init, null);
assert(e.astTypeName == "TypeidExp");
}
50 changes: 25 additions & 25 deletions src/attrib.d → src/dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@
* Source: $(DMDSRC _attrib.d)
*/

module ddmd.attrib;
module dmd.attrib;

import core.stdc.stdio;
import core.stdc.string;
import ddmd.aggregate;
import ddmd.arraytypes;
import ddmd.cond;
import ddmd.declaration;
import ddmd.dinterpret;
import ddmd.dmodule;
import ddmd.dscope;
import ddmd.dsymbol;
import ddmd.dtemplate;
import ddmd.errors;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.hdrgen;
import ddmd.id;
import ddmd.identifier;
import ddmd.mtype;
import ddmd.parse;
import ddmd.root.outbuffer;
import ddmd.root.rmem;
import ddmd.tokens;
import ddmd.utf;
import ddmd.utils;
import ddmd.visitor;
import dmd.aggregate;
import dmd.arraytypes;
import dmd.cond;
import dmd.declaration;
import dmd.dinterpret;
import dmd.dmodule;
import dmd.dscope;
import dmd.dsymbol;
import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.globals;
import dmd.hdrgen;
import dmd.id;
import dmd.identifier;
import dmd.mtype;
import dmd.parse;
import dmd.root.outbuffer;
import dmd.root.rmem;
import dmd.tokens;
import dmd.utf;
import dmd.utils;
import dmd.visitor;

/***********************************************************
*/
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bcomplex.d → src/dmd/backend/bcomplex.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Source: $(DMDSRC backend/_bcomplex.d)
*/

module ddmd.backend.bcomplex;
module dmd.backend.bcomplex;

extern (C++):
@nogc:
Expand Down
Loading