broad-daybreak-7542
02/22/2024, 7:09 PMpants dependencies package <path>
. However on building the file was not there. The issue was self-inflicted but not obvious to me. It turned out I had also included a parent path of this dependency in one of the source root patterns.
Any ideas why that might be? (I did not see any message in the logs on the lines of 'we cannot decide this dependency).
In the code snippet below the dependency is src/python/service_backend/service/src/backend/tasks/worker.py
and I had added src/python/service_backend/service/src/backend in the root patterns.
# pants.toml
....
[source]
root_patterns = [
'/src/python',
'/test/python',
"/src/python/service_backend/service/src/backend", # This is a parent path of the dependency listed in the pex binary
]
# BUILD pex at src/python/service_backend/service/native/backend
...
# pants package src/python/service_backend/service/native/backend
pex_binary(
name="backend_service",
script="supervisord",
args=["--configuration=src/python/service_backend/service/native/backend/supervisord.conf"],
dependencies=[":be_servers",
# Celery worker called from supervisor conf so not inferrable
"src/python/service_backend/service/src/backend/tasks/worker.py", # file not in the pex but listed as a dependency
],
execution_mode="venv",
layout="packed"
)