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

fix: incremental solving (rip issue #75) #15

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

aochagavia
Copy link
Contributor

@aochagavia aochagavia commented Jan 24, 2024

The original bug was caused by adding a conflicting requires clause, yet failing to detect and handle the conflict. This commit introduces a clearer separation between: adding new clauses, detecting conflicts, and handling said conflicts.

Closes #13

Closes prefix-dev/rip#75

The original bug was caused by adding a conflicting `requires` clause, yet failing to detect and
handle the conflict. This commit introduces a clearer separation between: adding new clauses,
detecting conflicts, and handling said conflicts.
// do not have watches)
// Negative assertions derived from other rules (assertions are clauses that consist of a
// single literal, and therefore do not have watches)
for &(solvable_id, clause_id) in &self.negative_assertions {
Copy link
Contributor

Choose a reason for hiding this comment

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

Propagation is done a lot, this now runs for all negative_assertions every time propagate is called. Would it make sense to only do this for a subset of the negative assertions?

Copy link
Member

Choose a reason for hiding this comment

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

Should we rerun the benchmarks in rattler?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think running the benchmarks makes sense. It's been a long time since I wrote this code, but I was under the impression that this part of propagation is not run that often (only after an arbitrary decision has been made). Also, it's not clear to me how to select the right subset of negative assertions without introducing complexity. With a bit of luck, the perf impact will be negligible and we can get away with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(For future reference: the benchmarks showed no significant difference / a slight improvement)

@baszalmstra baszalmstra merged commit 6ff4fcf into mamba-org:main Jan 25, 2024
3 checks passed
baszalmstra pushed a commit that referenced this pull request Jan 25, 2024
Note for reviewers: this PR assumes that #15 has been merged. Ideally,
I'd take my `fix-nested-deps-issue` branch as a base, but then the PR
would end up being created in my own repository. Fortunately the whole
code is in a single commit, so you can have a look at the last commit's
diff (or wait till #15 is merged).
@aochagavia aochagavia deleted the fix-nested-deps-issue branch January 25, 2024 10:37
@aochagavia
Copy link
Contributor Author

@sumanth-manchala thanks for creating the test that allowed me to develop this fix! I credited you in my last blog article :)

@sumanth-manchala
Copy link
Contributor

That was really unexpected!!! Thanks, means a ton❤️ and that int test was my first open source contribution!!

@aochagavia
Copy link
Contributor Author

Great to hear :)

For me, this is the 10th year since my first contribution. You can have a look at my first PR and you will have a good laugh, because I didn't know git that well back then 😅

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.

resolver issue where unreachable code is reached apache-airflow resolution
4 participants