forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disambiguate Python module providers by level of ancestry. (pantsbuil…
…d#17489) I.e., if we're looking for a provider for foo.bar, and we have one for foo.bar and one for foo, take the former over the latter. Previously we would see this as an ambiguity, and not infer a dep. This happened to a real user, in a situation where a namespace package was split between first-party and third-party code: pantsbuild#17286 This change involves a distinction between ModuleProvider and a new PossibleModuleProvider class, which also tracks the ancestry. Therefore {First,Third}PartyPythonModuleMapping now encapsulate the underlying dict instead of extending the dict. This clarifies that their role is to use the dict to produce other data, and they are not intended to be queried like dicts. Co-authored-by: Tal Amuyal <[email protected]>
- Loading branch information
Showing
3 changed files
with
260 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.