dune icon indicating copy to clipboard operation
dune copied to clipboard

Support pinning packages with an archive url

Open gridbugs opened this issue 1 year ago • 3 comments
trafficstars

Currently it looks like we support packages pinned to local paths and git urls but not archive urls. The ocaml.org project has a pin ["tailwindcss.dev" "https://github.com/tmattio/opam-tailwindcss/archive/3e60fc32bbcf82525999d83ad0f395e16107026b.tar.gz"]. Currently locking this project (after removing the package stanza from its dune-project file to workaround https://github.com/ocaml/dune/issues/10120) produces the error:

File "ocamlorg.opam", line 1, characters 0-0:
Error: Could not determine location of repository
https://github.com/tmattio/opam-tailwindcss/archive/3e60fc32bbcf82525999d83ad0f395e16107026b.tar.gz
Hint: Specify either a file path or git repo via SSH/HTTPS

gridbugs avatar Feb 23 '24 04:02 gridbugs

This is defo a bug, but is it critical? One can just swap the URL to use git and move on.

rgrinberg avatar Feb 23 '24 04:02 rgrinberg

I guess it depends on how we measure the MVP, and whether the release process of the affected package is just making an archive of the repo at the given revision or if there is additional processing before archiving.

gridbugs avatar Feb 23 '24 04:02 gridbugs

I checked and in this case the archive is just a snapshot of the repo.

gridbugs avatar Feb 23 '24 04:02 gridbugs