-
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
Conversation
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.
2182db3
to
5992d48
Compare
@maiste I've looked into the |
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.
Do we plan to support tarballs on the file system?
No, we expect people to untar directory themselves on the file system and point to the path. I don't think it is worth adding the machinery for this as there is already one for
If the file is updated remotely:
I don't think we have a proper when to address it. If we checked on every run, people would have to download the tar file every time they run I would expect people to want to be aware when the checksum change, but having to explicitly state when they want to synchronize the checksum. It would prevent them from downloading tar they don't expect to change. |
I think we should re-download the tarball and construct the checksum every time we run You could still avoid re-downloading if you use curl with the correct e-tag incantations. |
I agree with you, and this is what happens in the current situation. If you run Regarding the |
Okay, thanks. Is there a test that demonstrates that subsequent |
I'm rewriting my test to show the behavior. It should be ready for a next review round by the end of the day 👍 |
6a41320
to
2fb6b32
Compare
6 | (checksum md5=aaaaaaaaaaaaaaaaaaaaaaaaaaaaa))) | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Error: "md5=aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" is an invalid Cryptographic hash | ||
of a package. |
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 this is the wrong error message to show: this shows that the checksum is invalid as a checksum, but we want an error message that the checksum doesn't match.
You can probably just use any valid MD5, like 92449184682b45b5f07e811fdd61d35f
.
It seems that having caching efficient is not really easy for the pinning with http and tar. More specifically, it is hard to cache the fetch for when you need the To reduce the amount of Maybe I'm missing something, but it seems there is no way to avoid the double download without changing the logic. My proposition is to stick to the behavior where it stores the tar into the WDTY? |
IMO you should just write to a temp dir and leave a comment about future improvements. I think placing it in _build just creates a false expectation. You could just fix the re-downloading issue in subsequent PR's. In any case, I don't think this need to block the PR. |
Signed-off-by: Etienne Marais <dev@maiste.fr>
Co-authored-by: ArthurW <arthur@tarides.com> Signed-off-by: Etienne Marais <dev@maiste.fr>
Signed-off-by: Etienne Marais <dev@maiste.fr>
Co-authored-by: Marek Kubica <marek@xivilization.net> Signed-off-by: Etienne Marais <dev@maiste.fr>
Signed-off-by: Etienne Marais <dev@maiste.fr>
Signed-off-by: Etienne Marais <dev@maiste.fr>
Signed-off-by: Etienne Marais <dev@maiste.fr>
Signed-off-by: Etienne Marais <dev@maiste.fr>
f578c96
to
060be62
Compare
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