I have this setup: ```root |-- projA |-- projB |--...
# general
b
I have this setup:
Copy code
root
|-- projA
|-- projB
|-- shared
I have a BUILD file in projB that looks at an env var (e.g.
env('DOCKER_REGISTRY')
). When running any pants command for projA, it fails if the env var is not set, but it's unrelated to projA. When running commands for projA, I only care about projA and shared, but not projB. Is there a way to achieve this?
c
you can give it a default value, like
env("DOCKER_REGISTRY", "na")
(or, via
.pants.bootstrap
):
Copy code
export DOCKER_REGISTRY=${DOCKER_REGISTRY:-some-default-value}
b
Thanks... a follow up... is there a way to ignore projB when running things for projA. As an example, say projA and projB both have a dependency on langchain. When I run projA with pants run, I get warnings about ambiguous dependencies. Is this by design, and I should move the dependency to the shared project and enforce the same version between projA and projB, or is there a way to prevent such warnings?
c
Hi, either share the dependency, or if that is untenable/undesirable, put them into dedicated resolves.