Skip to content

Ignore inverse dependencies when building graph#2360

Merged
charliermarsh merged 1 commit intomainfrom
charlie/deps
Mar 11, 2024
Merged

Ignore inverse dependencies when building graph#2360
charliermarsh merged 1 commit intomainfrom
charlie/deps

Conversation

@charliermarsh
Copy link
Copy Markdown
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 charliermarsh requested review from konstin and zanieb March 11, 2024 17:19
@charliermarsh
Copy link
Copy Markdown
Member Author

This is pretty hard to reproduce.

@charliermarsh
Copy link
Copy Markdown
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