You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you add a new package to a project which is a dependency of an existing package in the project that has been released at least once, and set the version of the dependency to version, and you haven't yet released the new package,opam build fails to solve packages as it tries to find a version of the unreleased package matching the latest released version of the released package.
I've created a branch of my fork of opam-build to demonstrate:
git clone https://github.com/gridbugs/opam-build --branch=repro1
cd opam-build
opam build
...
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: []
[ERROR] Could not determine which packages to install for this switch:
* Missing dependency:
- foo >= 0.1.0
no matching version
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] y
opam-build: internal error, uncaught exception:
OpamStd.OpamSys.Exit(20)
My preference would be that for locally-defined packages opam build should not act differently depending on whether the package is released to the opam repo. When installing without opam build I can work around this problem by running opam pin . --with-version=foo (though I do wish that opam pin also didn't look up local packages in opam repo that that's beside the point).
Also it's unrelated, but the internal error, uncaught exception printed before exiting seems to happen whenever opam build runs an external program that fails to exit successfully.
My OS is NixOS and my opam is version 2.1.5.
The text was updated successfully, but these errors were encountered:
This is now fixed in 6a504e1
The code is quite ugly and it makes everything a bit slower but it should be better whenever ocaml/opam#5855 is fixed.
Also it's unrelated, but the internal error, uncaught exception printed before exiting seems to happen whenever opam build runs an external program that fails to exit successfully.
When you add a new package to a project which is a dependency of an existing package in the project that has been released at least once, and set the version of the dependency to
version
, and you haven't yet released the new package,opam build
fails to solve packages as it tries to find a version of the unreleased package matching the latest released version of the released package.I've created a branch of my fork of opam-build to demonstrate:
My preference would be that for locally-defined packages
opam build
should not act differently depending on whether the package is released to the opam repo. When installing withoutopam build
I can work around this problem by runningopam pin . --with-version=foo
(though I do wish thatopam pin
also didn't look up local packages in opam repo that that's beside the point).Also it's unrelated, but the
internal error, uncaught exception
printed before exiting seems to happen wheneveropam build
runs an external program that fails to exit successfully.My OS is NixOS and my opam is version 2.1.5.
The text was updated successfully, but these errors were encountered: