Skip to content
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

May old versions of cheerios be available on opam besides dev? #17

Closed
brando90 opened this issue Feb 14, 2023 · 9 comments
Closed

May old versions of cheerios be available on opam besides dev? #17

brando90 opened this issue Feb 14, 2023 · 9 comments

Comments

@brando90
Copy link

brando90 commented Feb 14, 2023

According to this page https://coq.inria.fr/opam/extra-dev/packages/coq-cheerios/, the only version of coq-cheerios available in opam is the dev version which follows the newest Coq. Can old version also be made available so to not break previous usages of cheerios?

context of previous installations: UCSD-PL/proverbot9001#78

@palmskog
Copy link
Collaborator

This has already been discussed in #12. Coq 8.10 is now almost 4 years old, and those who want to support for it will need to use old git commits in the repo. You can see in this issue comment how to install a specific commit via opam.

@palmskog palmskog closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@brando90
Copy link
Author

@palmskog which file do I need to update in my gitrepo such that the specified version of coq I want is used? this one? https://github.com/brando90/cheerios/blob/master/meta.yml

@brando90
Copy link
Author

@palmskog
Copy link
Collaborator

I don't really understand the question(s). Did you look at how opam pinning works? https://opam.ocaml.org/doc/Manual.html#Pinning

@brando90
Copy link
Author

@palmskog yes. I think what I need is to find commit that works with some specific version of coq (I am happy with any commit that makes things work).

Currently trying this one but didn't work:

opam pin add coq-cheerios https://github.com/uwplse/cheerios.git\#9c7f66e57b91f706d70afa8ed99d64ed98ab367d

@palmskog
Copy link
Collaborator

Well, you can pin a commit in your own fork of cheerios if you like, e.g., after making fixes to it. The general gist is that the upstream repo master HEAD will stay on 8.14+.

@brando90
Copy link
Author

@brando90
Copy link
Author

@palmskog wouldn't a more stable solution to not overwrite the things pushed to opam? Similar to how things are done in python with pip? :) May this be requested?

@brando90
Copy link
Author

for my issue I think this worked:

# -- Get cheerios, req to have old versions work in opam: https://github.com/uwplse/cheerios/issues/17
eval $(opam env --switch=coq-8.10 --set-switch)
# opam install might give issues since it gets the most recent version from the officialOPAM repository
#opam -y install coq-cheerios
# use opam pin since pin is created to install specific version (e.g. from git, local, etc.)
opam pin add coq-cheerios git+https://github.com/uwplse/cheerios.git#9c7f66e57b91f706d70afa8ed99d64ed98ab367

output:

(iit_synthesis) brando9~ $ opam pin add coq-cheerios git+https://github.com/uwplse/cheerios.git#9c7f66e57b91f706d70afa8ed99d64ed98ab367
[NOTE] Package coq-cheerios is currently pinned to git+https://github.com/uwplse/cheerios.git#9c7f66e57b91f706d70afa8ed99d64ed98ab367d (version dev).
Processing: [coq-cheerios.dev: git]
[coq-cheerios.dev] synchronised (no changes)
coq-cheerios is now pinned to git+https://github.com/uwplse/cheerios.git#9c7f66e57b91f706d70afa8ed99d64ed98ab367 (version dev)

The following actions will be performed:
  ∗ install coq-cheerios dev*
Do you want to continue? [Y/n]
[NOTE] Pinning command successful, but your installed packages may be out of sync.
(iit_synthesis) brando9~ $ opam switch
#  switch    compiler                    description
→  coq-8.10  ocaml-base-compiler.4.07.1  coq-8.10
   default   ocaml.5.0.0                 default

[NOTE] Current switch is set locally through the OPAMSWITCH variable.
       The current global system switch is unset.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants