-
Notifications
You must be signed in to change notification settings - Fork 409
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
Make File_bindings.Expanded.t type more precise #2041
Make File_bindings.Expanded.t type more precise #2041
Conversation
The dst is a local path, so it should be reflected as such Signed-off-by: Rudi Grinberg <[email protected]>
1cc9448
to
f3990eb
Compare
I have to say that I don't like that
(and The doc comment supports the first meaning, but in this feature you're using the second. The API is of split mind about this too: In support of meaning (1):
In support of meaning (2):
My personal opinion is that |
Yeah, indeed it's a bit confusing. But note that in this case, the relative path returned by the File_binding.t is not allowed to escape root. So the use case is valid. I support the introduction of |
Allowing to escape or not is not a difference I have in mind. I would expect neither local path nor relative (when used relative to local) to be able to escape the root. |
I see. Would it make sense to change the path module to be something like:
|
Yeah, sounds like a reasonable start. (it might equally make sense to have separate type for In_build_dir and In_source too, but one thing at a time) |
Looking at this again, it seems like (1) is essentially equivalent to So I think it would be better to have something like this:
|
Sounds reasonable to me! |
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
The dst is a local path, so it should be reflected as such
Signed-off-by: Rudi Grinberg [email protected]