dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-21 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:i4pgdp$1ba...@digitalmars.com... > Thanks for all the help, Nick. But I don't see your attachment. I can't > see it with the web-news reader, and on gmane there's garbled text at the > end, something like "begin 666 rdmdAlt.d m...@5w)I='1E;B!I;B!T:&41"!..

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-21 Thread Andrej Mitrovic
Man, I have no idea what's going on. I was trying out building with xfbuild, and I keep getting different results on each attempted build: Attempt 1: C:\next>xfbuild myproject.d myfolder\another.d +full +o=main Build failed: myfolder/another.obj: The system cannot find the file specified. Attemp

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-21 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:i4pkg0$2a5...@digitalmars.com... > Man, I have no idea what's going on. I was trying out building with > xfbuild, and I keep getting different results on each attempted build: > [snip] > > Geeez.. What am I supposed to use to compile the files?

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-21 Thread Andrej Mitrovic
Doh! I swear I've read somewhere that a module declaration needs to have the same name as the *file name*. I didn't know I had to add the path as well. That makes the modules work now. In fact, I probably just read this one line in the docs: "The ModuleDeclaration sets the name of the module an

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Rory Mcguire
Andrej Mitrovic wrote: > Doh! I swear I've read somewhere that a module declaration needs to have > the same name as the *file name*. I didn't know I had to add the path as > well. That makes the modules work now. > > In fact, I probably just read this one line in the docs: > > "The ModuleDeclar

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Andrej Mitrovic
That's very interesting. But wouldn't that cause problems if you're using package labels in some of those modules? AFAIK package gives access to all files in the current directory, so even if you "move" a module by changing the module declaration, the files in the current directory will still

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Mafi
Am 22.08.2010 16:39, schrieb Andrej Mitrovic: That's very interesting. But wouldn't that cause problems if you're using package labels in some of those modules? AFAIK package gives access to all files in the current directory, so even if you "move" a module by changing the module declaration,

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Andrej Mitrovic
Well then I think I've found some new bugs in RDMD & xfbuild: Files: root/main.d root/socket.d main.d: module main; import alt.socket; void main() { foo(); } socket.d: module alt.socket; import std.stdio : writeln; void foo() { writeln("test"); } $ RDMD main.d main.d(2): Error: mod

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Andrej Mitrovic
I see. Well, honestly, I would never use this flexibility to begin with. I'm not seeing much benefits in having modules named in one way while keeping them disorganized and in completely different folders. That just causes confusion, for both the programmer and the build tools. Personally, I'l

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:i4rnl4$239...@digitalmars.com... > Well then I think I've found some new bugs in RDMD & xfbuild: > > Files: > root/main.d > root/socket.d > > main.d: > module main; > > import alt.socket; > > void main() > { >foo(); > } > > socket.d: > module alt.socket

Re: dmd: Module X conflicts with itself (Was: Re: RDMD on Windows)

2010-08-22 Thread bearophile
Andrej Mitrovic: > Well, honestly, I would never use this flexibility to begin with. I'm not > seeing much benefits in having modules named in one way while keeping them > disorganized and in completely different folders. That just causes confusion, > for both the programmer and the build tools