-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use lockfile versions as resolution preferences #3921
Conversation
@@ -52,6 +52,11 @@ impl Lock { | |||
Lock::try_from(wire) | |||
} | |||
|
|||
/// Returns the [`Distribution`] entries in this lock. | |||
pub fn distributions(&self) -> &[Distribution] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BurntSushi - Let me know if you have a preferred way to do this (other than what's here). I expose Distribution
, but none of the fields or methods are pub
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks fine.
The thing I care about most is not exposing representation. I don't mean to say we shouldn't do it, but that's where the biggest benefit is. If we don't expose representation, then it makes it much easier to change that representation in the future. (It's all a trade off.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
@@ -52,6 +52,11 @@ impl Lock { | |||
Lock::try_from(wire) | |||
} | |||
|
|||
/// Returns the [`Distribution`] entries in this lock. | |||
pub fn distributions(&self) -> &[Distribution] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks fine.
The thing I care about most is not exposing representation. I don't mean to say we shouldn't do it, but that's where the biggest benefit is. If we don't expose representation, then it makes it much easier to change that representation in the future. (It's all a trade off.)
ba453ef
to
8214453
Compare
8214453
to
d7f803b
Compare
CodSpeed Performance ReportMerging #3921 will degrade performances by 6.17%Comparing Summary
Benchmarks breakdown
|
Summary
Ensures that we avoid upgrading packages unless
--upgrade
or similar is passed.For now, the resolver only respects these for registry distributions.
Closes #3918.