Commit 7ba7e8d
authored
[nix] create common ExperimentalFlags function (#678)
## Summary
I noticed that print-dev-env and nix profile commands were using a
different set
of nix experimental features.
I think we should unify these so that they're writing to the store in a
common fashion.
**Implementation Note**
It appears that: `"--extra-experimental-features", "nix-command
flakes"`, is different from `"--option", "experimental-features",
"nix-command flakes"` for our `nix print-dev-env` testscripts.
We must have the latter. The former is insufficient and not needed.
This confuses me because the docs suggest that
`--extra-experimental-features` should append these experimental
features, whereas `--option` replaces the experimental features:
> --option name value
Set the Nix configuration setting name to value (overriding nix.conf).
and
> --extra-experimental-features value
Append to the experimental-features setting.
Concretely, this works:
```
"--extra-experimental-features", "ca-derivations",
"--option", "experimental-features", "nix-command flakes",
```
but this does not work:
```
"--option", "experimental-features", "ca-derivations nix-command flakes",
```
and nor does this:
```
"--extra-experimental-features", "nix-command flakes",
"--extra-experimental-features", "ca-derivations",
```
## How was it tested?
`go test ./...`
in `examples/testdata/go/go-1.19` with flakes feature flag on for all
commands:
```
> devbox shell
(devbox)> devbox add vim emacs
(devbox)> source activate shell...
(devbox)> devbox rm emacs
```1 parent 2b77105 commit 7ba7e8d
3 files changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | 148 | | |
150 | 149 | | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | 234 | | |
236 | 235 | | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
150 | 149 | | |
151 | 150 | | |
152 | 151 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 152 | + | |
| 153 | + | |
159 | 154 | | |
160 | 155 | | |
161 | 156 | | |
| |||
178 | 173 | | |
179 | 174 | | |
180 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | 191 | | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | 210 | | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
0 commit comments