How am I expected to pass `--docker-execution` on ...
# development
b
How am I expected to pass
--docker-execution
on the cmdline (from the global options: https://www.pantsbuild.org/v2.19/docs/reference-global#docker_execution)
Copy code
$ pants --docker-execution test ::
Unknown flag --execution on docker scope
On Pants 2.18 😬
👀 1
So env vars work:
Copy code
$ PANTS_DOCKER_EXECUTION=true pants test ::
...
f
and the subsystem shares the same
docker
prefix
b
Right. I think the docker backend and this option are in collision. With no winner
c
ouch.
f
Some ideas: 1. Move
--docker-execution
onto the
docker
subsystem. And add an error during option setup to error on these cases. 2. Teach the option lookup logic to fallback to global scope if it does not find the option on a particular scope.
c
I’m in favour of (1). Not (2) as I don’t think we should allow having these kind of name conflicts.
b
I think I lean 2, but I'd have to think more
c
however, (1) has the downside of then requiring the docker backend to use the core environment feature..?
which feels like a no-go, then…
I think ultimately, the option need to be renamed, but continue supporting the old name behind the scenes as deprecated or something..
h
Not sure about (1) - the docker backend is for your docker builds, whereas this is truly a global thing
Yeah, we probably need a way of forcing the scope in a flag
This type of collision bites us occasionally
but not frequently enough that we've prioritized it
we should at least detect them, but it's hard to do with plugins
maybe
--global-foo
is longhand for global-scope
--foo