-
Notifications
You must be signed in to change notification settings - Fork 414
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
fix: support package pinning via http+tar #11446
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Etienne Marais <[email protected]>
Co-authored-by: ArthurW <[email protected]> Signed-off-by: Etienne Marais <[email protected]>
Signed-off-by: Etienne Marais <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The ZIP file changes can be added in a separate PR if you want, but I think that it would be useful to support it given it is a rather common format, especially on Windows.
src/dune_pkg/opamUrl0.ml
Outdated
@@ -30,10 +30,16 @@ let is_version_control t = | |||
|
|||
let is_local t = String.equal t.transport "file" | |||
|
|||
let local_or_git_only url loc = | |||
let is_tarball t = | |||
let supported_compress_format = [ "tar.gz"; "tgz"; "tar.bz2"; "tbz" ] in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should also include "tar"
.
Co-authored-by: Marek Kubica <[email protected]> Signed-off-by: Etienne Marais <[email protected]>
- bar.1.0.0 | ||
(version 1.0.0) | ||
(dev) | ||
(source (fetch (url http://0.0.0.0:1/tarball.tgz) (checksum md5=ecfb12cd56789e48aaa4eef289c85c40))) (dev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to determine the MD5 of the tarball that was created and make sure that it matches the one in the lock file. Otherwise it's not reproducible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done it using grep as the tar headers can make the hash different.
Signed-off-by: Etienne Marais <[email protected]>
Signed-off-by: Etienne Marais <[email protected]>
This PR reduces the gap between opam and dune package management functionnalities. It allows users to ping a tar file (gz or bz) using
http
(andhttps
) protocol.Closes #10121