-
Notifications
You must be signed in to change notification settings - Fork 686
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
avoid invalid filepaths on Windows #9254
Conversation
20c6bb6
to
d4c3859
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Would you mind providing a link that, more or less, captures the rules you are using? Preferably with a version number or date of retrieval. I've found something related: Cabal-tests/tests/ParserTests/regressions/denormalised-paths.check:The paths 'files/<>/.txt', 'c/**/.c', 'C:foo/bar', '||s' are invalid on Windows, which would cause portability problems for this package. Windows file names cannot contain any of the characters ":*?<>|" and there a few reserved names including "aux", "nul", "con", "prn", "com1-9", "lpt1-9" and "clock$". and Cabal/ChangeLog.md- * With and Cabal/src/Distribution/PackageDescription/Check.hs: [ check (not . FilePath.Windows.isValid . prettyShow . packageName $ pkg) |
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file is where I got the list I mentioned here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely sound (excluding bad names), certainly not complete (excluding only bad names).
Maybe ok, since there are enough good names it let's through. ;-)
c345a70
to
e1d3d0b
Compare
320467c
to
da1546f
Compare
da1546f
to
a3e613f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* avoid invalid filepaths on Windows * comment bad Arbitrary instances
* avoid invalid filepaths on Windows * comment bad Arbitrary instances
Template Β: This PR does not modify
cabal
behaviour (documentation, tests, refactoring, etc.)Include the following checklist in your PR: