ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.63k stars 409 forks source link

Support pinning packages with an archive url #10121

Open gridbugs opened 8 months ago

gridbugs commented 8 months ago

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
rgrinberg commented 8 months ago

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

gridbugs commented 8 months ago

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 commented 8 months ago

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