dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Bernard Helyer
A discussion on the Mono-D IRC channel just made me realise something. dmd -c foo/a.d bar/a.d The second module overwrites the first. This makes using 'pass everything at once' with Mono-D (IDE plugin) difficult/impossible. As far as I'm concerned, it's just a bug that's never come up.

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread David Nadlinger
On Wednesday, 22 February 2012 at 21:33:36 UTC, Bernard Helyer wrote: dmd -c foo/a.d bar/a.d The second module overwrites the first. -oq, anyone? ;) David

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread David Nadlinger
On Wednesday, 22 February 2012 at 21:36:10 UTC, David Nadlinger wrote: -oq, anyone? ;) Whoops, forgot the link: https://github.com/D-Programming-Language/dmd/pull/563. David

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Jonathan M Davis
On Wednesday, February 22, 2012 22:33:35 Bernard Helyer wrote: > A discussion on the Mono-D IRC channel just made me realise > something. > > dmd -c foo/a.d bar/a.d > > The second module overwrites the first. This makes using 'pass > everything at once' with Mono-D (IDE plugin) > difficult/imposs

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Bernard Helyer
On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M Davis wrote: Then what happens when you have dmc -c foo/a.d foo_a.d Good point. Regardless, I really wouldn't like the idea of screwing with the object file names to try and avoid collisions. Well, the thing is in this case eve

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Brad Roberts
On Wed, 22 Feb 2012, David Nadlinger wrote: > On Wednesday, 22 February 2012 at 21:36:10 UTC, David Nadlinger wrote: > > -oq, anyone? ;) > > Whoops, forgot the link: > https://github.com/D-Programming-Language/dmd/pull/563. > > David If only one of the attempts to implement that option actually

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Jonathan M Davis
On Wednesday, February 22, 2012 23:33:57 Bernard Helyer wrote: > On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M Davis > > wrote: > > Then what happens when you have > > > > dmc -c foo/a.d foo_a.d > > Good point. > > > Regardless, I really wouldn't like the idea of screwing with > >

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Bernard Helyer
On Wednesday, 22 February 2012 at 22:44:15 UTC, Jonathan M Davis wrote: On Wednesday, February 22, 2012 23:33:57 Bernard Helyer wrote: On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M Davis wrote: > Then what happens when you have > > dmc -c foo/a.d foo_a.d Good point. > Regardle

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Jonathan M Davis
On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: > Except DMD is faster by a factor of 10 when passing it all at > once. Then maybe there _should_ be a flag to tell it to use/generate the appropriate directory structure. You already typically give it an output directory. It wouldn'

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread H. S. Teoh
On Wed, Feb 22, 2012 at 05:05:40PM -0500, Jonathan M Davis wrote: > On Wednesday, February 22, 2012 22:33:35 Bernard Helyer wrote: > > A discussion on the Mono-D IRC channel just made me realise > > something. > > > > dmd -c foo/a.d bar/a.d > > > > The second module overwrites the first. This mak

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Jonathan M Davis
On Wednesday, February 22, 2012 16:08:20 H. S. Teoh wrote: > On Wed, Feb 22, 2012 at 05:05:40PM -0500, Jonathan M Davis wrote: > > On Wednesday, February 22, 2012 22:33:35 Bernard Helyer wrote: > > > A discussion on the Mono-D IRC channel just made me realise > > > something. > > > > > > dmd -c fo

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Kevin Cox
Although I agree that sources and objects should be sperated there are some benifits. All tools know where to look for the objects. And is not dificult to keep out of scm. A great example of this is Haskell. To compile an app you only need to specify the main file and it finds all the included

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread H. S. Teoh
On Wed, Feb 22, 2012 at 07:15:37PM -0500, Jonathan M Davis wrote: > On Wednesday, February 22, 2012 16:08:20 H. S. Teoh wrote: [...] > > The real solution is that when creating object files, dmd should put > > the .o files in the modules' respective subdirectories. I.e., it > > should keep the path

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread Jonathan M Davis
On Wednesday, February 22, 2012 16:28:45 H. S. Teoh wrote: > On Wed, Feb 22, 2012 at 07:15:37PM -0500, Jonathan M Davis wrote: > > Yuck. Yuck. Source should _always_ be separated from object files. > > It's incredibly messy otherwise. > > Not really. You just have .d's with their corresponding .o'

Re: dmd -c behaviour doesn't take account of packages.

2012-02-22 Thread H. S. Teoh
On Wed, Feb 22, 2012 at 09:36:12PM -0500, Jonathan M Davis wrote: > On Wednesday, February 22, 2012 16:28:45 H. S. Teoh wrote: > > On Wed, Feb 22, 2012 at 07:15:37PM -0500, Jonathan M Davis wrote: > > > Yuck. Yuck. Source should _always_ be separated from object files. > > > It's incredibly messy o

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-22 22:37, David Nadlinger wrote: On Wednesday, 22 February 2012 at 21:36:10 UTC, David Nadlinger wrote: -oq, anyone? ;) Whoops, forgot the link: https://github.com/D-Programming-Language/dmd/pull/563. David I've tried to implement that several times but something always fails on

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Sönke Ludwig
Am 23.02.2012 00:03, schrieb Jonathan M Davis: > On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: >> Except DMD is faster by a factor of 10 when passing it all at >> once. > > Then maybe there _should_ be a flag to tell it to use/generate the > appropriate > directory structure. Yo

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-22 23:42, Brad Roberts wrote: On Wed, 22 Feb 2012, David Nadlinger wrote: On Wednesday, 22 February 2012 at 21:36:10 UTC, David Nadlinger wrote: -oq, anyone? ;) Whoops, forgot the link: https://github.com/D-Programming-Language/dmd/pull/563. David If only one of the attempts to

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-22 23:05, Jonathan M Davis wrote: On Wednesday, February 22, 2012 22:33:35 Bernard Helyer wrote: A discussion on the Mono-D IRC channel just made me realise something. dmd -c foo/a.d bar/a.d The second module overwrites the first. This makes using 'pass everything at once' with Mono

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-22 23:43, Jonathan M Davis wrote: On Wednesday, February 22, 2012 23:33:57 Bernard Helyer wrote: On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M Davis wrote: Then what happens when you have dmc -c foo/a.d foo_a.d Good point. Regardless, I really wouldn't like the ide

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-22 23:33, Bernard Helyer wrote: On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M Davis wrote: Then what happens when you have dmc -c foo/a.d foo_a.d Good point. Regardless, I really wouldn't like the idea of screwing with the object file names to try and avoid collisi

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-23 00:03, Jonathan M Davis wrote: On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: Except DMD is faster by a factor of 10 when passing it all at once. Then maybe there _should_ be a flag to tell it to use/generate the appropriate directory structure. You already typica

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jonathan M Davis
On Thursday, February 23, 2012 12:06:54 Jacob Carlborg wrote: > On 2012-02-22 23:05, Jonathan M Davis wrote: > > If you're going to worry about modules when generating object files, then > > you really should be putting the object files in the same directory > > layout as the modules have. But that

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread H. S. Teoh
On Thu, Feb 23, 2012 at 01:42:44PM +0100, Jacob Carlborg wrote: > On 2012-02-23 00:03, Jonathan M Davis wrote: > >On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: > >>Except DMD is faster by a factor of 10 when passing it all at once. > > > >Then maybe there _should_ be a flag to tell

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Bernard Helyer
On Thursday, 23 February 2012 at 21:28:17 UTC, H. S. Teoh wrote: On Thu, Feb 23, 2012 at 01:42:44PM +0100, Jacob Carlborg wrote: On 2012-02-23 00:03, Jonathan M Davis wrote: >On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: >>Except DMD is faster by a factor of 10 when passing it a

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Bernard Helyer
On Thursday, 23 February 2012 at 23:06:56 UTC, Bernard Helyer wrote: Did you not read what Jacob posted? my.module.A.o my_module_A.o my_module.A.o my.module_A.o No conflicts. Also, you can't have a package called module.

Re: dmd -c behaviour doesn't take account of packages.

2012-02-23 Thread Jacob Carlborg
On 2012-02-24 00:06, Bernard Helyer wrote: On Thursday, 23 February 2012 at 21:28:17 UTC, H. S. Teoh wrote: On Thu, Feb 23, 2012 at 01:42:44PM +0100, Jacob Carlborg wrote: On 2012-02-23 00:03, Jonathan M Davis wrote: >On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: >>Except DMD i

Re: dmd -c behaviour doesn't take account of packages.

2012-02-24 Thread Jonathan M Davis
On Thursday, February 23, 2012 13:42:44 Jacob Carlborg wrote: > On 2012-02-23 00:03, Jonathan M Davis wrote: > > On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: > >> Except DMD is faster by a factor of 10 when passing it all at > >> once. > > > > Then maybe there _should_ be a flag

Re: dmd -c behaviour doesn't take account of packages.

2012-02-25 Thread Martin Nowak
On Wed, 22 Feb 2012 22:33:35 +0100, Bernard Helyer wrote: A discussion on the Mono-D IRC channel just made me realise something. dmd -c foo/a.d bar/a.d The second module overwrites the first. This makes using 'pass everything at once' with Mono-D (IDE plugin) difficult/impossible. A

Re: dmd -c behaviour doesn't take account of packages.

2012-02-25 Thread Sean Kelly
Be aware that if you use an archiver to put these files in a library you'll overwrite one. The command to preserve path name that the archiver provides on some OSes doesn't exist everywhere. On Feb 25, 2012, at 7:09 AM, "Martin Nowak" wrote: > On Wed, 22 Feb 2012 22:33:35 +0100, Bernard Helye