-
Notifications
You must be signed in to change notification settings - Fork 32
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
Manipulating foreign file paths #158
Comments
In GitLab by @maerwald on Jun 22, 2022, 17:43 I answered your question here: https://gitlab.haskell.org/haskell/filepath/-/issues/116#note_438455 Second part of the answer. So yes, AFPP is designed exactly for this. |
In GitLab by @Ericson2314 on Jun 22, 2022, 23:57 @maerwald Very glad to hear that the newtypes are in place! Can we add more CPP for the docs then? |
In GitLab by @Ericson2314 on Jun 23, 2022, 24:22 I started a draft MR in https://gitlab.haskell.org/haskell/filepath/-/merge_requests/111 to try to be completely clear about what sort of docs CPP I had in mind. :) |
In GitLab by @Ericson2314 on Aug 29, 2022, 21:21 mentioned in commit ghc/packages/filepath@cca0dc3b6f5ac0aadcc0b26537ebd246eaee042b |
In GitLab by @Ericson2314 on Jun 22, 2022, 13:33
I not infrequently want to manipulate
Windows
paths onUnix
, andUnix
paths on windows; this sort of thing comes up e.g. when planning tasks for a heterogeneous build farm to perform.filepath
has always confused me as to whether this sort of thing is supported. From the way the modules are CPP'd I think the answer is "yes", but the docs in e.g. https://hackage.haskell.org/package/filepath-2.0.0.3/candidate/docs/System-AbstractFilePath-Windows.html still have "On Windows..." "On Unix...." which is very confusing. I think we should CPP the docs to make this clear?Also, is it good that
AbstractFilePath
=PosixFilePath
on Unix? IMO this is certainly not wrong, but it is a foot-gun. It is akin to sayingInt
=Int64
on x86_64. Might we consider makingAbstractFilePath
newtype
instead?Sorry for bringing this stuff up at the 11th hour, but I figure it is much easier to deal with now than post release. We have a limited window to address this and any other would-be breaking change "regrets" from the old way of doing things, but that would require a
filepath-3
orAbtractFilePathTake2
, neither of which is very appealing!The text was updated successfully, but these errors were encountered: