-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolution by file order instead of alphabetical order #2898
Comments
After thinking about it: I think I would accept a pr which changes this
behavior
Am 14.11.2017 23:37 schrieb "Troy Kershaw" <[email protected]>:
… 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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2898>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNGETXfifw5IczRfKNmpgFLajXedoks5s2hYcgaJpZM4QeG2v>
.
|
Thanks Steffen, I'll get a PR together and we can discuss from there. |
So what I think you would need to do: look at packagerequirement and add a
new field Position. Then add to the CompareTo implementation. Fix all
compiler issues. Done.
Am 15.11.2017 14:15 schrieb "Troy Kershaw" <[email protected]>:
… Thanks Steffen, I'll get a PR together and we can discuss from there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2898 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNCCl9-G1A2JatzuQF7b83UUkg-XBks5s2uPjgaJpZM4QeG2v>
.
|
Thanks, that's a great help. Would you like this to replace the comparison by name, or should I feature flag it? |
The alphabetical was only a tie breaker anyway. I like to be able to break
it manually
Am 15.11.2017 14:54 schrieb "Troy Kershaw" <[email protected]>:
Thanks, that's a great help. Would you like this to replace the comparison
by name, or should I feature flag it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2898 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNIkIW6ryFuJcF6vxAaYF_nj6zMnvks5s2u0IgaJpZM4QeG2v>
.
|
I built that as part of conflict resolution fixes. Release under way |
Thanks Steffen, your change was much cleaner than mine was turning out to be :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 packagesXylophone
(not real) andKafunk
(real). The file does not lock a version on either.The
Kafunk
library has versions0.1.8
and0.1.9
.The
Xylophone
library has two release (1.0
and2.0
) that depend onKafunk
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 to2.0
, then resolveKafunk
, which would give0.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 supports0.1.9
. This resolves toXylophone
version1.0
. Like so:Known workarounds
Lock the version of
Kafunk
to the version used in the preferredXylophone
.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 latestXylophone
version.The text was updated successfully, but these errors were encountered: