-
Notifications
You must be signed in to change notification settings - Fork 409
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
URLs should allow picking a branch or tag explicitely #11140
Comments
This situation is probably more common than we might think. I believe it arises from the pattern of making a maintenance branch for released versions. |
Yes, it's also a bit annoying if it used to work (because the tag was created) but stopped (because a branch was created afterwards). The OPAM manual on URLs is surprisingly vague on this. I'll continue to investigate if they have a solution. Otherwise, the options I see:
|
I'd like a solution that ideally opam could adopt as well. So I'm not keen on 2. |
Signed-off-by: Marek Kubica <[email protected]>
@kit-ty-kate pointed out that in OPAM the whole path to the reference can be used, so
This seems fairly sensible as it does not introduce any magic syntax and in my testing it worked just fine, so I've created #11142 as a repro case to implement something similar on the Dune side. |
Signed-off-by: Marek Kubica <[email protected]>
* test: Add reproduction case for #11140 Signed-off-by: Marek Kubica <[email protected]> * Fix for non-GNU sed Signed-off-by: Marek Kubica <[email protected]> --------- Signed-off-by: Marek Kubica <[email protected]>
This reverses the split of branches and tags from ocaml#11127, instead putting all possible references (e.g. also pull requests) in the same map and implements short-hands for looking up unqualified refs. Fixes ocaml#11140 Signed-off-by: Marek Kubica <[email protected]>
This reverses the split of branches and tags from ocaml#11127, instead putting all possible references (e.g. also pull requests) in the same map and implements short-hands for looking up unqualified refs. Fixes ocaml#11140 Signed-off-by: Marek Kubica <[email protected]>
Desired Behavior
When I pin a repo, I want to be able to tell Dune explicitely whether the fragment in the URL is a tag or a branch.
Example
This is currently impossible because
v0.9.5.0
is both a branch and a tag in the repo and as a user I have no option to tell Dune which one it is. A possible workaround is to replace the tag with the commit hash, which is mostly workable, but with branches the commit the branch head points to is expected to change so it would require updating thepin
all the time.This ticket is inspired by #11113, which shows that repositories like this exist in the wild and are not just theoretical cases.
The text was updated successfully, but these errors were encountered: