Skip to content

Introduce Path abstraction #6667

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

Open
phadej opened this issue Apr 6, 2020 · 1 comment
Open

Introduce Path abstraction #6667

phadej opened this issue Apr 6, 2020 · 1 comment
Assignees
Labels
old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: refactor
Milestone

Comments

@phadej
Copy link
Collaborator

phadej commented Apr 6, 2020

Like the one already used in hackage-security.

We want to have Absolute rooted Paths, but also more specific like StoreDir, or PackageDir and ProjectDir which all would make handling paths a bit more robust.

It would helped a lot in my recent sdist refactor. Getting relative to PackageDir paths is tricky, not sure if I haven't missed any.

I however suggest to store these (file paths) in native way. (Not in POSIX like paths library does), because I'm quite sure that conversion from Windows to Posix and back won't roundtrip on fancier paths there might be. Therefore we might need separate PosixPath for tarballs etc if we end up needing such notion (and we might, index files...)

@phadej
Copy link
Collaborator Author

phadej commented Sep 14, 2020

https://oleg.fi/gists/posts/2020-09-13-a-design-for-paths.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: refactor
Projects
None yet
Development

No branches or pull requests

4 participants