https://pantsbuild.org/ logo
#general
Title
# general
b

broad-processor-92400

02/09/2023, 8:15 PM
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

curved-television-6568

02/09/2023, 8:20 PM
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

broad-processor-92400

02/09/2023, 8:22 PM
Thanks!
c

curved-television-6568

02/09/2023, 8:23 PM
yep 👍
w

witty-crayon-22786

02/09/2023, 8:24 PM
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)
5 Views