Skip to content
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

Arbitrary instances for InstallDirs and PathTemplate create invalid filenames #9281

Open
geekosaur opened this issue Sep 21, 2023 · 0 comments

Comments

@geekosaur
Copy link
Collaborator

Describe the bug
While they are used at multiple types, ultimately those bottom out to Prelude's FilePath which is String. The result is that the pathnames they generate can contain NULs, Windows device names, and illegal sequences (for example, on Windows a path component cannot end with a .).

Ideally we would use the new filepath library with its bespoke FilePath type, for which valid Arbitrary instances can be written and may even already exist. There is no way to make it work with Prelude's FilePath.

There is more discussion in #9253 and #9254, and the latter adds a warning comment to the problematic instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants