bitter-ability-32190
05/31/2023, 4:36 PMstr
also an Iterable[str]
in typing-land is dangerous.
We've had a long-standing bug in our graph traversal algorithm (for secondary ownership) it seems...
With that hint, can you find the bug? https://github.com/pantsbuild/pants/blob/b7dee2e576beb5a49790cf5c1803418624631c1a/src/python/pants/engine/internals/graph.py#L904
(Answer in 🧵 )proud-dentist-22844
05/31/2023, 4:39 PMOwnersRequest.sources
to a str?bitter-ability-32190
05/31/2023, 4:40 PMfor secondary_owner_field in secondary_owner_fields:
matching_files.update(
*secondary_owner_field.filespec_matcher.matches(list(sources_set))
)
We're unpacking a list of strings. set.update
takes *s: Iterable[T]
, meaning we're updating it with each character...bitter-ability-32190
05/31/2023, 4:42 PMwide-midnight-78598
05/31/2023, 5:10 PMfast-nail-55400
05/31/2023, 8:12 PMfast-nail-55400
05/31/2023, 8:13 PMpytype
with respect to Iterable[str]
and str
bitter-ability-32190
05/31/2023, 8:13 PMflat-zoo-31952
06/01/2023, 2:37 PMflat-zoo-31952
06/01/2023, 2:37 PM