-
Notifications
You must be signed in to change notification settings - Fork 45
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
perf: move jsr manifest checksum to locker #488
perf: move jsr manifest checksum to locker #488
Conversation
@@ -168,7 +168,6 @@ pub struct TestBuilder { | |||
workspace_members: Vec<WorkspaceMember>, | |||
workspace_fast_check: bool, | |||
lockfile_jsr_packages: BTreeMap<PackageReq, PackageNv>, | |||
verify_and_fill_checksums: bool, |
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.
Accidentally leftover in last PR. This does nothing.
.iter() | ||
.map(|p| p.1.found_dependencies.len()) | ||
.sum() | ||
} |
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'm using these two methods to tell whether the lockfile needs updating after building the graph in the CLI.
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.
Seems reasonable
pub fn verify_and_fill_checksums(&mut self, value: bool) -> &mut Self { | ||
self.verify_and_fill_checksums = value; | ||
pub fn ensure_locker(&mut self) -> &mut Self { | ||
self.locker.get_or_insert_with(Default::default); | ||
self | ||
} | ||
|
||
#[allow(unused)] |
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.
Why these attributes?
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.
There are multiple test runners sharing this code and they unfortunately error when one of them doesn't use a method.
Also it better organizes the code.