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
From today's meeting, for further discussion. I contend that there are two competing concepts in opam 2.1+:
Switch invariant (a formula - specifying a list of packages of course being a trivial case of a formula)
Root packages
When a switch is created, the invariant (i.e. --formula or --packages converted to a formula) is stored and persisted. So what used to be the "base packages" has no need of roots, because the formula precisely describes it.
When a package is installed, it still gets marked as a root. At any solver operation, both the invariant and the roots must be satisfied (the roots not as strongly, as IIRC existing roots can be removed if a newer part of the request requires it).
For set-invariant, I therefore don't think any roots should be amended - because we keep the formula. For opam install --formula, where we don't keep the formula (at least at the moment), some roots should indeed be inferred. However, it's also fine/correct (to me) that opam install foo followed by opam switch set-invariant --formula foo has foo marked as a root (because it was marked as a root at installation and invariant happens now to include it) where opam switch create baz --formula foo does not mark foo as a root (because it was never explicitly installed by the user, who specified an invariant formula instead).
When using
opam install --formula
root packages are not set. It affects switch export/import mechanism, as well set-invariant one.The text was updated successfully, but these errors were encountered: