-
Notifications
You must be signed in to change notification settings - Fork 709
Make cabal check reject packages with invalid file names #10295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sounds reasonable. @ffaf1, any thoughts? |
It is a sensible request. We already do some cabal/Cabal/src/Distribution/PackageDescription/Check.hs Lines 574 to 580 in 1e93e57
We just need to get this right with regard to — say — excluding autogenerated modules and the like. |
You don't need to exclude them. Autogenerated modules will also have files on the filesystem. (EDIT: when autogenerated...) |
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
I have put up a MR #10816 Let me know if you think this is along the right lines. There are already quite comprehensive checks in place for most of the paths you can write in a cabal file but not the module names. |
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
This change ensures that Cabal warns about modules with names that would cause portability issues, especially on Windows systems where certain names like "aux", "con", "nul", etc. are reserved by the operating system. Fixes #10295
Describe the feature request
Make cabal check reject packages when source distribution contains files with invalid names on any operating system. For example
aux
is not valid on Windows (and Windows file systems are case insensitive)., so e.g. moduleFoo.Aux.Helpers
orLanguage.Con
,Foreign.Nul
are a bad idea.Additional context
I think calling explicitly,
System.FilePath.Posix.isValid
andSystem.FilePath.Windows.isValid
would be enough.The text was updated successfully, but these errors were encountered: