Deimos: Consistent structure?

Jude Young 10equals2 at gmail.com
Mon Nov 21 01:30:59 PST 2011


On Mon 21 Nov 2011 03:06:56 AM CST, Jacob Carlborg wrote:
> On 2011-11-21 09:41, Jude Young wrote:
>> young at Dan-Laptop:~/bin$ mkdir mytest
>> young at Dan-Laptop:~/bin$ cd mytest/
>> young at Dan-Laptop:~/bin/mytest$ git clone
>> git://github.com/D-Programming-Deimos/ncurses
>> Cloning into 'ncurses'...
>> remote: Counting objects: 99, done.
>> remote: Compressing objects: 100% (66/66), done.
>> remote: Total 99 (delta 44), reused 86 (delta 31)
>> Receiving objects: 100% (99/99), 73.24 KiB, done.
>> Resolving deltas: 100% (44/44), done.
>> young at Dan-Laptop:~/bin/mytest$ l
>> ncurses/
>> young at Dan-Laptop:~/bin/mytest$ touch test.d
>> young at Dan-Laptop:~/bin/mytest$ l
>> ncurses/  test.d
>> young at Dan-Laptop:~/bin/mytest$ vim test.d
>> young at Dan-Laptop:~/bin/mytest$ mkdir otherproject
>> young at Dan-Laptop:~/bin/mytest$ touch otherproject/curses.d
>> young at Dan-Laptop:~/bin/mytest$ dmd -I/ncurses test.d
>> young at Dan-Laptop:~/bin/mytest$ ./test
>> I didn't bother to actually use the files compile-time will sort that
>> outl.
>> young at Dan-Laptop:~/bin/mytest$
>>
>>
>>
>> Yes DMD will try to compile blank files, yes 'test.d' had the exact
>> phrase "import ncurses.curses;"
>>
>> since git will automatically create the folder 'ncurses' when you clone
>> the project, that acts as the root package.
>> What is wrong with this?
>>
>> If I'm missing something, please tell me.
>
> That assumes ncurses/curses.d contains "module ncurses.curses;" and
> otherproject/curses.d contains "module otherproject.curses;" otherwise
> there will be a conflict:
>
False.  I actually ran the test that I showed you and encountered no 
errors. (other than something stupid I did along the way.  which I 
edited out...)
both curses.d file have "module curses;"
> "main.d(73): Error: module test from file foo/test.d conflicts with
> another module test from file bar/test.d"
>
> This is not the case with the current ncurses bindings:
> https://github.com/D-Programming-Deimos/ncurses/blob/master/curses.d
>
> It will look weird if top level modules contain something like "module
> foo.bar;" and I don't think the modules should depend on the name of
> the repository.
>

young at Dan-Laptop:~/bin/mytest$ vim otherproject/curses.d 
young at Dan-Laptop:~/bin/mytest$ dmd -I/ncurses -I/otherproject test.d

I made it so that both projects have identical module names. 
"module curses;"
DMD still works it out fine if you import "ncurses.curses, 
otherproject.curses;"

The only way that I can see you running into errors is if you insist 
upon using "import curses;".
Which I do not know how you will get around that anyways, so I think I 
am entirely missing your point.

...and it appears that there is an error in ncurses about unctrl.d...  
=(


I showed you an example, and there were no problems.
Show me an example where there will be problems, because everything you 
have told me does not seem to apply to the current situation.

I will fix both Deimos and ZeroMQ (and the projects I'm currently 
working on) if you can give me enough information to duplicate the 
problems.


More information about the Digitalmars-d mailing list