Re: Scaling rdmd up: build package at a time

2015-06-14 Thread anonymous via Digitalmars-d
On Saturday, 6 June 2015 at 20:27:12 UTC, anonymous wrote: The seemingly obvious thing to do: Pass the source files that need rebuilding and the object files of other modules to one dmd invocation. I implemented this. Preliminary pull request:

Re: Scaling rdmd up: build package at a time

2015-06-07 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-06 23:24, Atila Neves wrote: I don't think I understand. Where would these object files come from unless you're doing per-module compilation, C-style? What I've already implemented is variant 1 mentioned before. If you compile multiple files with DMD without linking it will

Re: Scaling rdmd up: build package at a time

2015-06-07 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-06 23:41, Andrei Alexandrescu wrote: Doesn't work because no separate object file per source is being produced. -- Andrei They're produced if you don't link. -- /Jacob Carlborg

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread anonymous via Digitalmars-d
On Saturday, 6 June 2015 at 19:44:15 UTC, Andrei Alexandrescu wrote: On 6/6/15 11:47 AM, Jacob Carlborg wrote: [...] I mean that rdmd should compile all files that has changed including its dependencies, no more, no less. It should compile all these files in one go. Yah, that's the

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-05 18:15, Andrei Alexandrescu wrote: This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It looks like you want to support incremental compilation. Two questions: * Is that possible? I know there has been some problems with this in the

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Atila Neves via Digitalmars-d
On Friday, 5 June 2015 at 16:15:21 UTC, Andrei Alexandrescu wrote: This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It requires an understanding of how rdmd currently works (1KLOC in a single module!) and is of huge impact. Who'd want to get

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 8:51 AM, Atila Neves wrote: My $0.02: any project large enough to care about if rdmd builds per package or not is likely to need a real build system anyway. Integrating the strategy within rdmd will help make it popular and widespread. I recall Liran has had issues with build times

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Atila Neves via Digitalmars-d
On Saturday, 6 June 2015 at 15:54:39 UTC, Andrei Alexandrescu wrote: On 6/6/15 8:51 AM, Atila Neves wrote: My $0.02: any project large enough to care about if rdmd builds per package or not is likely to need a real build system anyway. Integrating the strategy within rdmd will help make it

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 6:03 AM, Jacob Carlborg wrote: On 2015-06-05 18:15, Andrei Alexandrescu wrote: This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It looks like you want to support incremental compilation. Two questions: * Is that possible? I know there

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-06 22:27, anonymous wrote: The seemingly obvious thing to do: Pass the source files that need rebuilding and the object files of other modules to one dmd invocation. That's what I've been thinking all along and trying to say. -- /Jacob Carlborg

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread anonymous via Digitalmars-d
On Saturday, 6 June 2015 at 21:24:05 UTC, Atila Neves wrote: I don't think I understand. Where would these object files come from unless you're doing per-module compilation, C-style? Huh, I somehow assumed dmd would spit out multiple object files when given multiple source files. Since that's

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 1:27 PM, anonymous wrote: The seemingly obvious thing to do: Pass the source files that need rebuilding and the object files of other modules to one dmd invocation. Doesn't work because no separate object file per source is being produced. -- Andrei

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 2:42 PM, anonymous wrote: But if dmd could be made to produce multiple object files ... (I have no idea if that's doable.) Not advantageously. -- Andrei

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Atila Neves via Digitalmars-d
On Saturday, 6 June 2015 at 21:10:22 UTC, Jacob Carlborg wrote: On 2015-06-06 22:27, anonymous wrote: The seemingly obvious thing to do: Pass the source files that need rebuilding and the object files of other modules to one dmd invocation. That's what I've been thinking all along and

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 12:15 PM, Shammah Chancellor wrote: On Friday, 5 June 2015 at 16:15:21 UTC, Andrei Alexandrescu wrote: This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It requires an understanding of how rdmd currently works (1KLOC in a single module!)

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-06-06 17:38, Andrei Alexandrescu wrote: Compiling several files at once is faster. The natural boundary is one package. Perhaps I misunderstand something. Why compile files that has not changed? I mean that rdmd should compile all files that has changed including its dependencies,

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Shammah Chancellor via Digitalmars-d
On Friday, 5 June 2015 at 16:15:21 UTC, Andrei Alexandrescu wrote: This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It requires an understanding of how rdmd currently works (1KLOC in a single module!) and is of huge impact. Who'd want to get

Re: Scaling rdmd up: build package at a time

2015-06-06 Thread Andrei Alexandrescu via Digitalmars-d
On 6/6/15 11:47 AM, Jacob Carlborg wrote: On 2015-06-06 17:38, Andrei Alexandrescu wrote: Compiling several files at once is faster. The natural boundary is one package. Perhaps I misunderstand something. Why compile files that has not changed? I mean that rdmd should compile all files that

Scaling rdmd up: build package at a time

2015-06-05 Thread Andrei Alexandrescu via Digitalmars-d
This is a self-contained and really fun project: https://issues.dlang.org/show_bug.cgi?id=14654 It requires an understanding of how rdmd currently works (1KLOC in a single module!) and is of huge impact. Who'd want to get into it? I would if I didn't already have std.allocator to have fun