Require correct casing for class/procedure references?

Posted by Marko Myllymäki on 02-Nov-2018 09:05

We are developing on Windows but want to be able to run code on Linux as well. As we all know, Linux is case sensitive, so we have a problem if there are class/procedure file references (RUN, NEW etc.) with incorrect casing. I am looking for a way to trap those errors already in development. Any ideas? I don't have any experience with SonarQube yet; could it be used for handling this?

I think it would be easier to have every file name in lowercase, but I would not like to change our current class/procedure/namespace naming convention (camel case).

It would be great to have a "require-correct-case" option for the compiler... 

Posted by bronco on 02-Nov-2018 10:36

You don't need a Linux VM anymore, with Windows 10 April release anyway. Just:

fsutil.exe file SetCaseSensitiveInfo C:\folder\path enable

And then Windows/NTFS behaves just like any Linux file system. And yes, you get those compile error in PDSOE, not at runtime on Linux.

Posted by Mike Fechner on 02-Nov-2018 09:58

SonarQube with the Riverside Plugin for OpenEdge is great at detecting those.
 
For class references, running a build in a tiny little Linux VM helps as well – as you’d be getting compile time errors.
 
We do integration builds on Windows and Linux and we execute unit-tests on Linux too.

All Replies

Posted by v205 on 02-Nov-2018 09:19

I think  a "require-correct-case" option for the compiler is a great suggestion.

I hope someone from Progress is watching this thread and pays attention. I have been bitten by scenarios where you want to use Camel Case, because it just makes more sense, and a programmer comes along and screws up the casing and Linux deployment blows up.

Posted by bronco on 02-Nov-2018 09:23

Well, assuming you are not one of those stubborn people who think Windows 7 is better than Windows 10:

www.windowscentral.com/how-enable-ntfs-treat-folders-case-sensitive-windows-10

or just Google for "ntfs case sensitive"

Posted by Torben on 02-Nov-2018 09:51

This option should also work for RUN VALUE(db.field) and analyse all data in database for correct case ;)

Posted by Mike Fechner on 02-Nov-2018 09:58

SonarQube with the Riverside Plugin for OpenEdge is great at detecting those.
 
For class references, running a build in a tiny little Linux VM helps as well – as you’d be getting compile time errors.
 
We do integration builds on Windows and Linux and we execute unit-tests on Linux too.

Posted by bronco on 02-Nov-2018 10:36

You don't need a Linux VM anymore, with Windows 10 April release anyway. Just:

fsutil.exe file SetCaseSensitiveInfo C:\folder\path enable

And then Windows/NTFS behaves just like any Linux file system. And yes, you get those compile error in PDSOE, not at runtime on Linux.

Posted by bronco on 02-Nov-2018 10:38

But, although this helps for the correct casing (classes, .p's, .i's etc) , you still could have issues with forward slashes.

Posted by Peter Judge on 02-Nov-2018 10:54

And for references to .NET classes that inadvertently sneak in.
 

Posted by Matt Baker on 02-Nov-2018 11:10

The .net thing is easy to avoid if you want, by specifying -noclr

documentation.progress.com/.../index.html

Posted by Peter Judge on 02-Nov-2018 11:56

As you say.
 
Note that the doc is inaccurate – this parameter applies to ALL ABL clients (not just PASOE).
 
 

Posted by Marko Myllymäki on 05-Nov-2018 14:17

Thanks for all the answers and comments, they were very helpful and we will evaluate the different approaches. Setting case sensitivity in Win10 seems an interesting and easy solution, I had not thought of that.

This thread is closed