Sitelet https://github.com/fsprojects/Paket/issues/2898
Skip to content

Resolution by file order instead of alphabetical order #2898

Description

@troykershaw

Description

When Paket has no way to determine package weight, it defaults to alphabetical order. I would like it to resolve by the order the packages are written in the paket.dependencies file.

Is there a way to do this?

If not, would you welcome a PR that implements it (using a paket.dependencies flag)?

Repro steps

I have a paket.dependencies file that requires two packages Xylophone (not real) and Kafunk (real). The file does not lock a version on either.

nuget Xylophone
nuget Kafunk

The Kafunk library has versions 0.1.8 and 0.1.9.

The Xylophone library has two release (1.0 and 2.0) that depend on Kafunk like so:
v2 : nuget Kafunk =0.1.8
v1 : nuget Kafunk >=0.0.1

Expected behavior

What I would like is to resolve by file order. Xylophone is first in the file, so resolve to 2.0, then resolve Kafunk, which would give 0.1.8

Actual behavior

Paket will try to resolve dependencies in alphabetical order. It starts with Kafunk, gets the latest (0.1.9), then looks for the version of Xylophone that supports 0.1.9. This resolves to Xylophone version 1.0. Like so:

Kafunk (0.1.9)
Xylophone (1.0)

Known workarounds

Lock the version of Kafunk to the version used in the preferred Xylophone.

nuget Xylophone
nuget Kafunk =0.1.8

The problem with this as a solution is that users of Xylophone and Kafunk need to know that not only is there a resolution issue, but they need to manually update the Kafunk version to match the latest Xylophone version.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions