Skip to content
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

Merged
merged 4 commits into from
May 27, 2024

Conversation

dsherret
Copy link
Member

Also it better organizes the code.

@dsherret dsherret requested a review from bartlomieju May 27, 2024 20:54
@@ -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,
Copy link
Member Author

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()
}
Copy link
Member Author

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.

Copy link
Member

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)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these attributes?

Copy link
Member Author

@dsherret dsherret May 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants