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
The new --latests-only parameter added in #5375 plays in unexpected ways with "package selectors" such as --depends-on or --required-by.
Given "package selectors" and "state selectors" are separate, they have a fixed order. Currently "package selectors" are ran first then "state selectors" are applied. However i would argue that the distinction is not well defined and should be revised before the release of 2.4 to make sure we don't break the behaviour of the new parameter.
Example
opam list --latests-only --depends-on base --all-versions --short pcre returns pcre.7.4.4 despite pcre.8.0.2 being the latest version and the position of the --latest-only parameter doesn't matter.
I would argue that the expected behaviour of such a set of parameter is to instead first filter the latest packages then to see which packages in these depend on base
The text was updated successfully, but these errors were encountered:
Notes from dev meeting: we agreed on merging the two types of selectors (though we should keep the set-order behaviour when OPAMCLI < 2.4), and change the list of parameters given by OpamArg.package_selection by passing a new ~admin parameter for whether or not it is meant to be used with opam list or opam admin list
The reasoning that is that some parameters are CLI position sensitive (OpamCommand.list'state_selector) while others precedence is hardcoded (OpamArg.package_selection). It is better to harmonise both and have them all CLI position sensitive to give more ways to the user to query with opam list.
There is no emergency on having it in 2.4 as --latests-only has been introduced in 2.3, but it would be a good to have.
The new
--latests-only
parameter added in #5375 plays in unexpected ways with "package selectors" such as--depends-on
or--required-by
.Given "package selectors" and "state selectors" are separate, they have a fixed order. Currently "package selectors" are ran first then "state selectors" are applied. However i would argue that the distinction is not well defined and should be revised before the release of 2.4 to make sure we don't break the behaviour of the new parameter.
Example
opam list --latests-only --depends-on base --all-versions --short pcre
returnspcre.7.4.4
despitepcre.8.0.2
being the latest version and the position of the--latest-only
parameter doesn't matter.I would argue that the expected behaviour of such a set of parameter is to instead first filter the latest packages then to see which packages in these depend on
base
The text was updated successfully, but these errors were encountered: