I just had a fun issue to debug. Connexion.Relati...
# general
p
I just had a fun issue to debug. Connexion.RelativeResolver was taking the string to the module. As such there was no hard dependency which caused the underlying modules to be packaged into the python executable. It was an easy fix, but that said, is there a way I can see the actual file dependencies? When I was running dependencies on, it was telling me that the underlying target was included.
Oh, maybe I run dependencies on the python executable target? I’ll try that in the morning.
b
In theory using that goal with a specific file should show exactly what pants understands as the deps for that file. It is easy to get caught out with the generators like
python_sources
because passing the path to that target will show the union dependencies for all of the files that go into it, so if
a.py
depends on something but
b.py
doesnt, you’ll get different answers for
pants dependencies path/to:target
vs
pants dependencies path/to/b.py
h
Note that you can enable "string imports" to heuristically detect these deps: https://www.pantsbuild.org/docs/reference-python-infer#string_imports
This feature exists because Django uses runtime load-by-name a LOT
p
Thanks