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

The behaviour of opam show of multiple packages is inconsistent #6355

Open
kit-ty-kate opened this issue Jan 6, 2025 · 0 comments
Open

The behaviour of opam show of multiple packages is inconsistent #6355

kit-ty-kate opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@kit-ty-kate
Copy link
Member

kit-ty-kate commented Jan 6, 2025

This is morally a reopening of #2980 issue 1.

Currently opam show ocaml ocaml-base-compiler will show both packages just fine.
But opam show ocaml.5.4.0 ocaml.5.3.0 will not work and even opam show "ocaml>=5.3.0" "ocaml<=5.4.0" that one would expect to work if formula were merged using and does not work as expected either as it will always display the same package twice (or how many times the package is present as argument):

$ opam show ocaml.5.4.0 ocaml.5.3.0
[ERROR] No package matching ocaml.5.4.0 or ocaml.5.3.0 found
$ opam show "ocaml>=5.3.0" "ocaml<=5.4.0"

<><> ocaml: information on all versions <><><><><><><><><><><><><><><><><><><><>
name                   ocaml
all-installed-versions [...]
all-versions           3.07  3.07+1  3.07+2  3.08.0  3.08.1  3.08.2  3.08.3  3.08.4  3.09.0  3.09.1  3.09.2  3.09.3  3.10.0  3.10.1  3.10.2  3.11.0  3.11.1  3.11.2  3.12.0  3.12.1  4.00.0  4.00.1  4.01.0  4.02.0
                       4.02.1  4.02.2  4.02.3  4.02.4  4.03.0  4.03.1  4.04.0  4.04.1  4.04.2  4.04.3  4.05.0  4.05.1  4.06.0  4.06.1  4.06.2  4.07.0  4.07.1  4.07.2  4.08.0  4.08.1  4.08.2  4.09.0  4.09.1  4.09.2
                       4.10.0  4.10.1  4.10.2  4.10.3  4.11.0  4.11.1  4.11.2  4.11.3  4.12.0  4.12.1  4.12.2  4.13.0  4.13.1  4.13.2  4.14.0  4.14.1  4.14.2  4.14.3  5.0.0  5.0.1  5.1.0  5.1.1  5.1.2  5.2.0
                       5.2.1  5.2.2  5.3.0  5.4.0

<><> Version-specific details <><><><><><><><><><><><><><><><><><><><><><><><><>
version     5.3.0
[...]

<><> ocaml: information on all versions <><><><><><><><><><><><><><><><><><><><>
name                   ocaml
all-installed-versions [...]
all-versions           3.07  3.07+1  3.07+2  3.08.0  3.08.1  3.08.2  3.08.3  3.08.4  3.09.0  3.09.1  3.09.2  3.09.3  3.10.0  3.10.1  3.10.2  3.11.0  3.11.1  3.11.2  3.12.0  3.12.1  4.00.0  4.00.1  4.01.0  4.02.0
                       4.02.1  4.02.2  4.02.3  4.02.4  4.03.0  4.03.1  4.04.0  4.04.1  4.04.2  4.04.3  4.05.0  4.05.1  4.06.0  4.06.1  4.06.2  4.07.0  4.07.1  4.07.2  4.08.0  4.08.1  4.08.2  4.09.0  4.09.1  4.09.2
                       4.10.0  4.10.1  4.10.2  4.10.3  4.11.0  4.11.1  4.11.2  4.11.3  4.12.0  4.12.1  4.12.2  4.13.0  4.13.1  4.13.2  4.14.0  4.14.1  4.14.2  4.14.3  5.0.0  5.0.1  5.1.0  5.1.1  5.1.2  5.2.0
                       5.2.1  5.2.2  5.3.0  5.4.0

<><> Version-specific details <><><><><><><><><><><><><><><><><><><><><><><><><>
version     5.3.0
[...]

I think we can change this behaviour and instead show each atoms independently in all cases.
In fact i'm unsure allowing the full capacity of an atom (pkg, pkg.version, pkg<op>version, <local file>) is appropriate for this command. I think only allowing pkg, pkg.version and <local file> seems more appropriate.

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

No branches or pull requests

1 participant