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

Hardens the interface of OpamUrl.local_{file,dir} #5975

Closed
wants to merge 2 commits into from

Conversation

kit-ty-kate
Copy link
Member

Would help to debug #5971

This change is done to be able to show an error message instead of a raw assert failure when an expected local file does not exist.

This is a breaking API change and will require a change in ocaml-opam/opam-publish#138. While not strictly necessary, i believe this change is an overall improvement and will help track similar issues in the future.

One related issue i'm seeing with how these functions are used at the moment, is that if you have a url like file+git://<your-git-repo>/some/file/possibly/modified/or/untracked/since/HEAD this function would happily return the file in question, which it seems like it should not do. I'm not sure if this behaviour is exploited in the wild or in our code but i think this issue is separate and can be tracked in a later issue.

This is done to be able to show an error message instead of a raw assert failure when an expected local file does not exist
@kit-ty-kate
Copy link
Member Author

Superseded by #5979 and #5978

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

Successfully merging this pull request may close these issues.

2 participants