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

feat: move favored,locked package and env variables into ResolveOptions #218

Merged
merged 5 commits into from
Feb 16, 2024

Conversation

nichmor
Copy link
Collaborator

@nichmor nichmor commented Feb 13, 2024

No description provided.

@nichmor nichmor marked this pull request as draft February 13, 2024 14:01
@nichmor nichmor marked this pull request as ready for review February 16, 2024 14:25
@@ -434,7 +431,7 @@ mod tests {
let (wheel_builder, _temp) = setup(ResolveOptions::default()).await;

// Build the wheel
wheel_builder.build_wheel(&sdist).await.unwrap();
wheel_builder.clone().build_wheel(&sdist).await.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the clone here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because later we do this:

  // Build the wheel
        wheel_builder.build_wheel(&sdist).await.unwrap();

        // See if we can retrieve it from the cache
        wheel_builder
            .package_db
            .local_wheel_cache()
            .wheel_for_key(&key)
            .unwrap()
            .unwrap();

and wheel builder is moved because of build_wheel

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait.. we don't want that at all, then we should accept a self: &Arc<self> in the WheelBuilder we definitely do not want to move for each method call

Copy link
Contributor

Choose a reason for hiding this comment

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

That would result in too many clones.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agree - changed to passing references

@tdejager tdejager merged commit 8c301ba into prefix-dev:main Feb 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants