Weird one: I've got a test. It has a dependency th...
# general
h
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
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
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
So an error in dep inference?
h
Seems like it.
h
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
Correct
h
OK, so maybe not a dep inference bug but something else
Is A directly importing C?
1
h
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.