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

Warnings about unknown variables being printed #349

Open
Leonidas-from-XIV opened this issue Nov 11, 2022 · 3 comments
Open

Warnings about unknown variables being printed #349

Leonidas-from-XIV opened this issue Nov 11, 2022 · 3 comments
Labels
solver Issue caused by the solver (0install). upstream Fix has to be implemented upstream

Comments

@Leonidas-from-XIV
Copy link
Member

Reported by @samoht:

$ opam-monorepo lock
==> Using 1 locally scanned package as the target.
[WARNING] Unknown variable "ocaml-system:version"
[WARNING] Unknown variable "ocaml-base-compiler:version"
[WARNING] Unknown variable "ocaml-variants:version"
==> Found 19 opam dependencies for the target package.
==> Querying opam database for their metadata and Dune compatibility.
==> Calculating exact pins for each of them.
==> Wrote lockfile with 11 entries to project.opam.locked. You can now run opam monorepo pull to fetch their sources.

The project.opam file does not use the version fields, so we should look into why these are being passed into OPAM and triggering this warning.

@palainp
Copy link

palainp commented Dec 17, 2022

Not sure if I'm in the same case, but testing with OCaml 5.0.0 released yesterday, I get the same messages.

The message is printed by https://github.com/ocaml-opam/opam-0install-solver/blob/b759d7c1c2f140724020f57599ead9ee394a8f7a/lib/switch_context.ml#L23 and the package using these variables is https://github.com/ocaml/opam-repository/blob/master/packages/ocaml-options-vanilla/ocaml-options-vanilla.1/opam .

@Leonidas-from-XIV
Copy link
Member Author

Thanks @palainp, it looks like this commit introduced them: ocaml/opam-repository@ab440dd and the 0install solver doesn't seem have support for those. I'll take a look what's going on.

@Leonidas-from-XIV
Copy link
Member Author

An error report already exists: ocaml-opam/opam-0install-solver#45, so this issue will need to be solved on the solver-side.

@tmattio tmattio added solver Issue caused by the solver (0install). upstream Fix has to be implemented upstream labels Jan 10, 2023
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this issue Apr 28, 2023
After a debugging session with @kit-ty-kate as part of fixing
tarides/opam-monorepo#349 and
ocaml-opam/opam-0install-solver#46 we realized
that OPAM doesn't support resolving package variables in `conflicts`
fields (the linter complains about this in `depends` fileds but not in
`conflicts` fields, but the solver never resolves these variables). So
this constraint doesn't do anything in OPAM and it causes issues in the
opam-0install-solver which attempts to resolve them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solver Issue caused by the solver (0install). upstream Fix has to be implemented upstream
Projects
None yet
Development

No branches or pull requests

3 participants