-
-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part of #7735 and the design doc at https://docs.google.com/document/d/1vXRHWK7ZjAIp2BxWLwRYm1QOKDeXx02ONQWvXDloxkg/edit?usp=sharing. A followup PR will allow individual targets to set the `environment` field, which means that you can run part of your codebase with different environments than others. For the `environment` field to work, we decided environments should have an "alias", which is a logical name the user defines, like `[python].resolves`. This is for two reasons: 1. We need the user to statically define which `local_environment` targets are valid. We can't auto-discover via `AllTargets` because it would result in a rule graph cycle. 2. We want to let users override which environment is used via the options system, e.g. redefine what `centos6` points to. They need to be able to do this without rewriting BUILD files. The `environment` field will default to `__local__`, where Pants auto-detects which environment to use based on the platform. This means adding a `compatible_platforms` field so that you can, for example, have a Linux-only environment and macOS-only environment. In a followup, we also likely want to add `[environments].local_override` to instruct Pants which value to use with `__local__`. [ci skip-rust]
- Loading branch information
1 parent
f61a98c
commit fbb402a
Showing
4 changed files
with
158 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters