www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc-0.19 violates D spec bahavior on module name case sensitivity

reply Wolfgang Draxinger <wdraxinger darkstargames.de> writes:
[http://www.digitalmars.com/d/module.html]
 By convention, package and module names are all lower case.
 This is because those names have a one-to-one correspondence
 with the operating system's directory and file names, and many
 file systems are not case sensitive. All lower case package and
 module names will minimize problems moving projects between
 dissimilar file systems.

Contrary to that GDC treats the import statement case sensitive. If GDC sees within a case sensitive file system multiple files, which names are ambigous if treated case insensitive it should omit an error, reporting where the ambigoutiy is. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith jabber.org, ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
Oct 17 2006
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Wolfgang Draxinger wrote:

 [http://www.digitalmars.com/d/module.html]
 
By convention, package and module names are all lower case.
This is because those names have a one-to-one correspondence
with the operating system's directory and file names, and many
file systems are not case sensitive. All lower case package and
module names will minimize problems moving projects between
dissimilar file systems.

Contrary to that GDC treats the import statement case sensitive. If GDC sees within a case sensitive file system multiple files, which names are ambigous if treated case insensitive it should omit an error, reporting where the ambigoutiy is.

Doesn't "names have a one-to-one correspondence with file names" instead mean that the import statement *should* be case sensitive ? --anders
Oct 17 2006
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Anders F Björklund wrote:

 Wolfgang Draxinger wrote:
 
 [http://www.digitalmars.com/d/module.html]
 
By convention, package and module names are all lower case.
This is because those names have a one-to-one correspondence
with the operating system's directory and file names, and many
file systems are not case sensitive. All lower case package and
module names will minimize problems moving projects between
dissimilar file systems.

Contrary to that GDC treats the import statement case sensitive. If GDC sees within a case sensitive file system multiple files, which names are ambigous if treated case insensitive it should omit an error, reporting where the ambigoutiy is.

Doesn't "names have a one-to-one correspondence with file names" instead mean that the import statement *should* be case sensitive ? --anders

Yes, the doc there is a convention, not spec. It just suggest that you should use lower case names, since that might reduce problems when moving files between systems. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Oct 17 2006
parent reply Wolfgang Draxinger <wdraxinger darkstargames.de> writes:
Lars Ivar Igesund wrote:

 Yes, the doc there is a convention, not spec. It just suggest
 that you should use lower case names, since that might reduce
 problems when moving files between systems.

Then you got another problem, e.g. if somebody works on a Windows box and has mounted his stuff from a Linux/Samba Server. Depending on the configuration of Samba the files might end up all uppercase, in which case a compiler farm running under Linux are unable to locate the files, since Samba made them uppercase. I think that D, aiming to cancel out ambiguouties, should make it a definitive specification, that all files and module names are treated case insensitive. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith jabber.org, ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
Oct 17 2006
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Wolfgang Draxinger wrote:

 Lars Ivar Igesund wrote:
 
 Yes, the doc there is a convention, not spec. It just suggest
 that you should use lower case names, since that might reduce
 problems when moving files between systems.

Then you got another problem, e.g. if somebody works on a Windows box and has mounted his stuff from a Linux/Samba Server. Depending on the configuration of Samba the files might end up all uppercase, in which case a compiler farm running under Linux are unable to locate the files, since Samba made them uppercase. I think that D, aiming to cancel out ambiguouties, should make it a definitive specification, that all files and module names are treated case insensitive. Wolfgang Draxinger

If that happens, you have a problem with Samba, not D. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Oct 17 2006
parent reply Wolfgang Draxinger <wdraxinger darkstargames.de> writes:
Lars Ivar Igesund wrote:

 If that happens, you have a problem with Samba, not D.

The bahaviour can be freely configured and some people (not me) prefer it that way. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith jabber.org, ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
Oct 18 2006
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Wolfgang Draxinger wrote:

 Lars Ivar Igesund wrote:
 
 If that happens, you have a problem with Samba, not D.

The bahaviour can be freely configured and some people (not me) prefer it that way. Wolfgang Draxinger

Then they shouldn't do cross platform development ;) -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Oct 18 2006
parent reply Wolfgang Draxinger <wdraxinger darkstargames.de> writes:
Lars Ivar Igesund wrote:

 Then they shouldn't do cross platform development ;)

There are a few example programs which don't compile under Linux (and other case sensitive OS of course). For example ctrace: Since the filenames in the archive are all lowercase, but within ctrace.d a module ctParams is referenced it doesn't compile, except you rename ctparams.d to ctParams.d or change the module name and references to it to ctparams. Wolfgang Draxinger -- E-Mail address works, Jabber: hexarith jabber.org, ICQ: 134682867 GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
Oct 18 2006
parent Gregor Richards <Richards codu.org> writes:
Wolfgang Draxinger wrote:
 Lars Ivar Igesund wrote:
 
 
Then they shouldn't do cross platform development ;)

There are a few example programs which don't compile under Linux (and other case sensitive OS of course). For example ctrace: Since the filenames in the archive are all lowercase, but within ctrace.d a module ctParams is referenced it doesn't compile, except you rename ctparams.d to ctParams.d or change the module name and references to it to ctparams. Wolfgang Draxinger

I do think this should be changed, but it's in the frontend, not GDC. The appropriate place to talk about this would be digitalmars.D. - Gregor Richards
Oct 18 2006