Commit 8c61ad4
Support multiple pixi envs w/ Environment.activate
Replaces the builder-level .environment() method (which baked a single
pixi environment name into the built Environment) with a runtime
activate(name) method on Environment itself. This better reflects the
pixi data model: a pixi project directory is a single unit that can
house multiple named environments, all sharing one build step.
env.activate("foo") eagerly runs `pixi install --environment foo` and
returns a new, ready Environment targeting that prefix. The default
environment is installed as usual during build(); non-default ones are
installed on demand via activate(). The base Environment.activate()
throws UnsupportedOperationException so other environment types stay
clean.
As per apposed/appose-python@59e6d94.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8401825 commit 8c61ad4
4 files changed
Lines changed: 72 additions & 41 deletions
File tree
- src
- main/java/org/apposed/appose
- builder
- test/java/org/apposed/appose/builder
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
236 | 248 | | |
237 | 249 | | |
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
241 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
242 | 264 | | |
243 | 265 | | |
244 | 266 | | |
| |||
Lines changed: 24 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 60 | | |
76 | 61 | | |
77 | 62 | | |
| |||
106 | 91 | | |
107 | 92 | | |
108 | 93 | | |
109 | | - | |
110 | 94 | | |
111 | 95 | | |
112 | 96 | | |
| |||
289 | 273 | | |
290 | 274 | | |
291 | 275 | | |
292 | | - | |
293 | | - | |
| 276 | + | |
294 | 277 | | |
295 | 278 | | |
296 | 279 | | |
297 | 280 | | |
298 | 281 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | 282 | | |
307 | | - | |
| 283 | + | |
308 | 284 | | |
309 | 285 | | |
310 | 286 | | |
| |||
322 | 298 | | |
323 | 299 | | |
324 | 300 | | |
325 | | - | |
326 | 301 | | |
327 | | - | |
328 | | - | |
| 302 | + | |
329 | 303 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | 304 | | |
335 | | - | |
| 305 | + | |
336 | 306 | | |
337 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
338 | 327 | | |
339 | 328 | | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | 205 | | |
207 | 206 | | |
208 | 207 | | |
| 208 | + | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
0 commit comments