You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,6 +201,23 @@ This workspace has a (nonsensical) `nogo` variant that, when enabled, excludes a
201
201
It also changes the config of all Go packages to include the `-tags foo` flag. You can explore the effects of a variant using `collect` and `describe`, e.g. `leeway --variant nogo collect files` vs `leeway collect files`.
202
202
You can list all variants in a workspace using `leeway collect variants`.
203
203
204
+
## Environment Manifest
205
+
Leeway does not control the environment in which it builds the packages, but assumes that all required tools are available already (e.g. `go` or `yarn`).
206
+
This however can lead to subtle failure modes where a package built in one enviroment ends up being used in another, because no matter of the environment they were built in, they get the same version.
207
+
208
+
To prevent such issues, leeway computes an _environment manifest_ which contains the versions of the tools used, as well as some platform information.
209
+
The entries in that manifest depend on the package types used by that workspace, e.g. if only `Go` packages exist in the workspace, only `go version`, [GOOS and GOARCH](https://golang.org/pkg/runtime/#pkg-constants) will be part of the manifest.
210
+
You can inspect a workspace's environment manifest using `leeway describe environment-manifest`.
211
+
212
+
You can add your own entries to a workspace's environment manifest in the `WORKSPACE.yaml` like so:
213
+
```YAML
214
+
environmentManifest:
215
+
- name: gcc
216
+
command: ["gcc", "--version"]
217
+
```
218
+
219
+
Using this mechanism you can also overwrite the default manifest entries, e.g. "go" or "yarn".
220
+
204
221
## Nested Workspaces
205
222
Leeway has some experimental support for nested workspaces, e.g. a structure like this one:
0 commit comments