fsprojects / fsprojects/Paket

paket dependency order importance

Open
#3,669 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

The order of dependencies in a paket.dependency file is important when using strategy:min
Even though the docs state:
Note, however, that all direct dependencies will still get their latest matching versions, no matter the value of the strategy option. If you want to influence the resolution of direct dependencies then read about the lowest_matching option. this is NOT always the case.

Repro steps

Create a repo with dependency of

source https://api.nuget.org/v3/index.json
framework: auto-detect
storage: none
strategy: min

nuget Castle.Core
nuget Castle.Windsor

Run a paket install, everything looks good, you have castle.core with the latest version.

Flip the 2 dependencies round.

Castle.Core is downgraded to the miniumum required by Castle.Windsor

Expected behavior

Order is not important in a dependencies file

Actual behavior

Order is important in a dependencies file

Known workarounds

Get things in the right order...whatever that may be ;)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with the two paket.dependency files shown and run paket install using strategy:min. Trace dependency resolution for Castle.Core and Castle.Windsor, then verify that reversing their declarations produces the same resolved versions and that the documented direct-dependency behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.