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 for unknown ocaml variables #45

Open
MisterDA opened this issue Dec 6, 2022 · 1 comment
Open

Warnings for unknown ocaml variables #45

MisterDA opened this issue Dec 6, 2022 · 1 comment

Comments

@MisterDA
Copy link

MisterDA commented Dec 6, 2022

I'm seeing these warnings running ocaml-ci-local:

[WARNING] Unknown variable "ocaml-system:version"
[WARNING] Unknown variable "ocaml-base-compiler:version"
[WARNING] Unknown variable "ocaml-variants:version"

They come from opam-0install-solver: https://github.com/ocaml-opam/opam-0install-solver/blob/master/lib/dir_context.ml#L59

What may be done to fix this?

@Leonidas-from-XIV
Copy link

The issues seems to be ocaml/opam-repository@ab440dd which introduces variables that reference other packages. As @palainp notes the error comes from

let r = OpamPackageVar.resolve_switch ~package:pkg t.st v in
where OpamPackageVar.resolve_switch will always resolves to None.

It might be due to the packages not being installed in the switch, so attempting to get their version fails. Needs more investigation.

Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-0install-solver that referenced this issue Dec 20, 2022
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-0install-solver that referenced this issue Dec 20, 2022
1. Fixes the problem of not resolving variables that refer to other
   packages
2. Silences the warning about unresolved variables if the variable
   refers to a package that is not installed.
3. Keeps the warning if the variable is not referring to a package and
   undefined OR the package is installed and is missing the definition.

Closes ocaml-opam#45.
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 a pull request may close this issue.

2 participants