spack/share/spack/qa
Harmen Stoppels 3c641c8509
spack env activate: create & activate default environment without args (#40756)
This PR implements the concept of "default environment", which doesn't have to be
created explicitly. The aim is to lower the barrier for adopting environments.

To (create and) activate the default environment, run

```
$ spack env activate
```

This mimics the behavior of

```
$ cd
```

which brings you to your home directory.

This is not a breaking change, since `spack env activate` without arguments
currently errors. It is similar to the already existing `spack env activate --temp`
command which always creates an env in a temporary directory, the difference
is that the default environment is a managed / named environment named `default`.

The name `default` is not a reserved name, it's just that `spack env activate`
creates it for you if you don't have it already.

With this change, you can get started with environments faster:

```
$ spack env activate [--prompt]
$ spack install --add x y z
```

instead of

```
$ spack env create default
==> Created environment 'default in /Users/harmenstoppels/spack/var/spack/environments/default
==> You can activate this environment with:
==>   spack env activate default
$ spack env activate [--prompt] default 
$ spack install --add x y z
```

Notice that Spack supports switching (but not stacking) environments, so the
parallel with `cd` is pretty clear:

```
$ spack env activate named_env
$ spack env status
==> In environment named_env
$ spack env activate
$ spack env status
==> In environment default
```
2023-11-05 22:53:26 -08:00
..
configuration warn about removal of deprecated format strings (#34101) 2022-11-28 10:03:49 -08:00
bashcov Use kcov from official Ubuntu 20.04 repository (#25385) 2021-08-19 14:03:10 -07:00
completion-test.sh bugfix: only complete aliases for potential aliases (#39887) 2023-09-08 12:51:26 +02:00
flake8_formatter.py Style: black 23, skip magic trailing comma (#35351) 2023-02-16 23:06:12 -06:00
run-build-tests license year bump (#34921) 2023-01-18 14:30:17 -08:00
run-shell-tests license year bump (#34921) 2023-01-18 14:30:17 -08:00
run-style-tests license year bump (#34921) 2023-01-18 14:30:17 -08:00
run-unit-tests license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-env-test.csh license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup-env-test.fish spack env activate: create & activate default environment without args (#40756) 2023-11-05 22:53:26 -08:00
setup-env-test.sh spack env activate: create & activate default environment without args (#40756) 2023-11-05 22:53:26 -08:00
setup.sh license year bump (#34921) 2023-01-18 14:30:17 -08:00
setup_spack_installer.ps1 Windows: reenable unit tests (#33385) 2022-12-09 13:27:46 +00:00
test-env-cfg.sh license year bump (#34921) 2023-01-18 14:30:17 -08:00
test-framework.sh license year bump (#34921) 2023-01-18 14:30:17 -08:00
validate_last_exit.ps1 Windows: reenable unit tests (#33385) 2022-12-09 13:27:46 +00:00
vcvarsall.ps1 Add Github Actions for Windows (#24504) 2022-03-17 09:01:01 -07:00
windows_test_setup.ps1 Hraden Spack's powershell interface (#37079) 2023-04-21 08:58:37 -05:00