Skip to content

opam list: unexpected interaction between --latests-only and --depends-on #6387

Open
@kit-ty-kate

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions