high-yak-85899
05/13/2022, 9:34 PMpaths
. I have two dockerfiles with pex binaries that I know are independent of one another. But somehow paths
is saying that they are dependent. Here's a quick sketch of what I have
> src
> foo
A.py
B.py
Dockerfile
> bar
C.py
D.py
Dockerfile
A.py
depends on B.py
and goes into foo/Dockerfile
as a pex. C.py
depends on D.py
and B.py
and goes into bar/Dockerfile
. When I do paths
from bar/Dockerfile
to A.py
, I would expect no link, but somehow I am getting one through the Dockerfiles. Do target tags mess with the dependency tree at all?high-yak-85899
05/13/2022, 9:36 PMhundreds-father-404
05/13/2022, 9:37 PMDo target tags mess with the dependency tree at all?No, they are not involved in dependency inference
hundreds-father-404
05/13/2022, 9:38 PMdependees
and dependencies
goals might be helpful to confirm where the bad dep is getting introducedhigh-yak-85899
05/13/2022, 9:44 PM./pants dependencies --transitive C.py
, I see A.py
in the output. When I do ./pants paths --from=bar/C.py --to=foo/A.py
, I get
bar/C.py:sources
foo/foo-docker
foo/foo-pex
foo/A.py:sources
high-yak-85899
05/13/2022, 9:44 PMhundreds-father-404
05/13/2022, 9:51 PM./pants dependees foo/foo-docker
high-yak-85899
05/13/2022, 9:53 PMhigh-yak-85899
05/13/2022, 10:20 PMhigh-yak-85899
05/13/2022, 10:22 PMdocker_image(name="foo")
high-yak-85899
05/13/2022, 10:23 PMhigh-yak-85899
05/13/2022, 10:27 PMdocker_image
target (or rename it), I get a ResolveError saying foo
can't be found.hundreds-father-404
05/13/2022, 10:28 PMdependencies
?high-yak-85899
05/13/2022, 10:29 PMhigh-yak-85899
05/13/2022, 10:29 PMB.py
as a dependency, I needed to say B.py:sources
high-yak-85899
05/13/2022, 10:29 PMC.py
and A.py
high-yak-85899
05/13/2022, 10:30 PMB.py:sources
, it's expecting to find the default name which would be B.py:foo
high-yak-85899
05/13/2022, 10:30 PMfoo
is the name of my docker_image
target because of how I want it to show up in our registryhundreds-father-404
05/13/2022, 10:30 PMhigh-yak-85899
05/13/2022, 10:30 PMhigh-yak-85899
05/13/2022, 10:31 PMhigh-yak-85899
05/13/2022, 10:31 PMhundreds-father-404
05/13/2022, 10:33 PMname
and have tailor use defaults like python_sources(name="lib")
. I think it makes things more predictablehigh-yak-85899
05/13/2022, 10:34 PMhundreds-father-404
05/13/2022, 10:38 PMcurved-television-6568
05/14/2022, 5:51 AMhigh-yak-85899
05/14/2022, 5:55 AM