https://pantsbuild.org/ logo
#general
Title
# general
h

high-yak-85899

01/31/2022, 9:01 PM
Weird one: I've got a test. It has a dependency that I've specified and is working as expected (i.e. I see it when I do
./pants dependencies path/to/my_test.py
). When I do
./pants dependencies path/to/depended_on_thing
, I see the correct dependencies I'd expect there. However, when I do
./pants dependencies --transitive path/to/my_test.py
, I don't see the correct dependency of
depended_on_thing
. Apologies for the genericized version of this, but any ideas?
h

hundreds-father-404

01/31/2022, 9:06 PM
Huh...
is working as expected
Are things building correctly, like
./pants test
? It's only project introspection via
dependencies
that is behaving incorrectly? (Trying to narrow down the scope)
I don't see the correct dependency of depended_on_thing.
it's missing?
h

high-yak-85899

01/31/2022, 9:08 PM
Nope, it's complaining about being unable to import something. So I realized it wasn't picking things up because that module is indeed missing when I do
--transitive
When I manually add the dependency as an override, things are happy again.
h

happy-kitchen-89482

01/31/2022, 10:22 PM
So an error in dep inference?
h

high-yak-85899

01/31/2022, 10:27 PM
Seems like it.
h

happy-kitchen-89482

02/01/2022, 12:16 AM
hmm, that's unusual. To be sure I understand, you're saying that for A->B->C the
dependencies
of A include B, the
dependencies
of B include C, but the
dependencies --transitive
of A do not include C ?
h

high-yak-85899

02/01/2022, 12:20 AM
Correct
h

happy-kitchen-89482

02/01/2022, 12:21 AM
OK, so maybe not a dep inference bug but something else
Is A directly importing C?
1
h

high-yak-85899

02/01/2022, 12:25 AM
A, because of how things are set up, uses
importlib
to do the actual import of B (so it's manually listed as a dependency in
overrides
in the BUILD file). B directly imports C.
2 Views