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

Ignore inverse dependencies when building graph #2360

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

It turns out that when we iterate over the incompatibilities of a package, PubGrub will also show us the inverse dependencies. I suspect this was rare, because we have a version check at the bottom... So, this specifically required that you had some dependency that didn't end up appearing in the output resolution, but that matched the version constraints of the package you care about.

In this case, langchain-community depends on langchain-core. So we were seeing an incompatibility like:

FromDependencyOf(Package(PackageName("langchain-community"), None, None), Range { segments: [(Included("0.0.10"), Included("0.0.10")), (Included("0.0.11"), Included("0.0.11"))] }, Package(PackageName("langchain-core"), None, None), Range { segments: [(Included("0.1.8"), Excluded("0.2"))] })

Where we were iterating over langchain-core, and looking for version 0.0.11... which happens to match langchain-community. (`langchain-community was omitted from the resolution; hence, it didn't exist in the map.)

Closes #2358.

@charliermarsh charliermarsh added the bug Something isn't working label Mar 11, 2024
@charliermarsh
Copy link
Member Author

This is pretty hard to reproduce.

@charliermarsh
Copy link
Member Author

I can reproduce with just:

b2sdk==1.32.0
llama-index==0.4.40

But it's an expensive test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolver panics due to missing key in inverse
2 participants