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

Solver: lookup already installed opam package by name alone #1328

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ManasJayanth
Copy link
Member

When the ocaml compiler package uses a metadata tag (eg
-musl.static.flambda or -afl), the solver which consists of two
stages (opam and npm) erroneously requests two ocaml packages - the
tagged one and the latest.

This is explained as follows:

During opam phases, the solver corrects requests the tagged package,
but during the subsequent solve-naively phase (meant for npm), it
fails to see find ocaml@* (TODO: doesn't seem right) and tries to
fetch ocaml@* too

When the ocaml compiler package uses a metadata tag (eg
-musl.static.flambda or -afl), the solver which consists of two
stages (opam and npm) erroneously requests two ocaml packages - the
tagged one and the latest.

This is explained as follows:

During opam phases, the solver corrects requests the tagged package,
but during the subsequent solve-naively phase (meant for npm), it
fails to see find `ocaml@*` (TODO: doesn't seem right) and tries to
fetch ocaml@* too
@ManasJayanth ManasJayanth force-pushed the prometheansacrifice/lookup-opam-installed-by-name branch from 2d67ffa to 0fe9e62 Compare June 17, 2021 09:44
@EduardoRFS
Copy link
Collaborator

I think this should not be applied in the general case, only for OCaml itself, ocaml is a known special package. Or maybe we can have an opamName on your esy.json to point this out, but just resolving it likes this doesn't work as you will mix opam deps and npm deps.

@ManasJayanth
Copy link
Member Author

I'm more worried about the why ocaml@* comes up again - it happens only when tagged releases (or in semver terms, prereleases) are used. This PR is in draft because I'm not convinced with the fix myself. It does, however, fix multiple ocaml packages being pulled in.

@phated
Copy link
Contributor

phated commented Sep 24, 2021

@ManasJayanth Could this also be the issue behind my lockfile problems in #1349 ? Often those packages will use tagged packages to vary between different os/arch support

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

Successfully merging this pull request may close these issues.

None yet

3 participants