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

Refusing local pinnings on opam switch create repeats the question #6374

Open
AltGr opened this issue Jan 22, 2025 · 2 comments · May be fixed by #6375
Open

Refusing local pinnings on opam switch create repeats the question #6374

AltGr opened this issue Jan 22, 2025 · 2 comments · May be fixed by #6375

Comments

@AltGr
Copy link
Member

AltGr commented Jan 22, 2025

Transcript:

$ opam switch create . ocaml.5.1.2 --ignore-constraints-on ocaml
The following additional pinnings are required by tryocaml.0.10:
  - js_of_ocaml.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-compiler.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-lwt.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-ppx.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-tyxml.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - ocp-indent-nlfork.1.5.4 at git+https://[email protected]/OCamlPro/ocp-indent.git#nlfork
Pin and install them? [Y/n] n
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
tryocaml is now pinned to git+file:///home/lg/ocamlpro/tryocaml#tryocaml (version 0.10)
The following additional pinnings are required by tryocaml.0.10:
  - js_of_ocaml.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-compiler.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-lwt.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-ppx.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - js_of_ocaml-tyxml.3.10.1 at git+https://github.com/AltGr/js_of_ocaml#fix-bytecode
  - ocp-indent-nlfork.1.5.4 at git+https://[email protected]/OCamlPro/ocp-indent.git#nlfork
Pin and install them? [Y/n] n
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y

I'd be best not to ask the question twice

@kit-ty-kate
Copy link
Member

This behaviour comes from f3f9083 which uses handle_extra_pins (since renamed handled_pin_depends) in bothsource_pin and autopin (which itself uses source_pin), so the question is asked twice if the packages are not already pinned.

In my opinion it looks like the second call in autopin was a simple oversight so removing it should be just fine (so far testing seems to indicate no problem). Do you remember why this was done?

@AltGr
Copy link
Member Author

AltGr commented Jan 23, 2025

Indeed I was expecting something like that... but I'm sorry I don't remember why the second autopin could have been necessary :/
Thanks for the quick fix!
@rjbou might have more insight ?

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

Successfully merging a pull request may close this issue.

2 participants