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

Add State::add_incompatibility_from_dependencies (#27) #300

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Dec 20, 2024

This PR upstreams astral-sh#27 since i got merge conflicts on it.


This wrapper avoids accessing the incompatibility_store directly in uv code.

Before:

let dep_incompats = self.pubgrub.add_version(
    package.clone(),
    version.clone(),
    dependencies,
);
self.pubgrub.partial_solution.add_version(
    package.clone(),
    version.clone(),
    dep_incompats,
    &self.pubgrub.incompatibility_store,
);

After:

self.pubgrub.add_incompatibility_from_dependencies(package.clone(), version.clone(), dependencies);

add_incompatibility_from_dependencies is one of the main methods for the custom interface to pubgrub.

This wrapper avoids accessing the `incompatibility_store` directly in uv
code.

Before:

```rust
let dep_incompats = self.pubgrub.add_version(
    package.clone(),
    version.clone(),
    dependencies,
);
self.pubgrub.partial_solution.add_version(
    package.clone(),
    version.clone(),
    dep_incompats,
    &self.pubgrub.incompatibility_store,
);
```

After:

```rust
self.pubgrub.add_incompatibility_from_dependencies(package.clone(), version.clone(), dependencies);
```

`add_incompatibility_from_dependencies` is one of the main methods for
the custom interface to pubgrub.
@konstin konstin force-pushed the konsti/dev/add-incompat-for-deps branch from e126fa6 to 8685610 Compare December 20, 2024 09:23
@Eh2406 Eh2406 added this pull request to the merge queue Dec 20, 2024
Merged via the queue into dev with commit 10cb803 Dec 20, 2024
6 checks passed
@Eh2406 Eh2406 deleted the konsti/dev/add-incompat-for-deps branch December 20, 2024 16:03
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