Why does 2.15's environments feature (very cool, b...
# general
b
Why does 2.15's environments feature (very cool, btw) indirect the environment references through `pants.toml`'s ``environments-previews.names` setting? It seems like
[environments-previews.names] foo = "//:foo
with
some_target(..., environment="foo")
could, naively, be collapsed to
some_target(..., environment="//:foo")
without needing the duplication in `pants.toml`; am I missing something?
c
it effectively allows you to redirect which environment targets are associated with through the configuration, which could accommodate differences in dev environments for instance.
it’s probably better explained in the design doc.. @witty-crayon-22786 could likely dig up a link to that if interested 🙂
b
Thanks!
c
yep 👍
w
yea. that, and having a complete set of environments listed somewhere, so that
__local__
(the default for targets that don’t set one) can resolve against a complete set
👍 2
(…without scanning the entire repo for … another … reason)