spack/share/spack
Nathan Hanford d83f7110d5
specs: move to new spec.json format with build provenance (#22845)
This is a major rework of Spack's core core `spec.yaml` metadata format.  It moves from `spec.yaml` to `spec.json` for speed, and it changes the format in several ways. Specifically:

1. The spec format now has a `_meta` section with a version (now set to version `2`).  This will simplify major changes like this one in the future.
2. The node list in spec dictionaries is no longer keyed by name. Instead, it is a list of records with no required key. The name, hash, etc. are fields in the dictionary records like any other.
3. Dependencies can be keyed by any hash (`hash`, `full_hash`, `build_hash`).
4. `build_spec` provenance from #20262 is included in the spec format. This means that, for spliced specs, we preserve the *full* provenance of how to build, and we can reproduce a spliced spec from the original builds that produced it.

**NOTE**: Because we have switched the spec format, this PR changes Spack's hashing algorithm.  This means that after this commit, Spack will think a lot of things need rebuilds.

There are two major benefits this PR provides:
* The switch to JSON format speeds up Spack significantly, as Python's builtin JSON implementation is orders of magnitude faster than YAML. 
* The new Spec format will soon allow us to represent DAGs with potentially multiple versions of the same dependency -- e.g., for build dependencies or for compilers-as-dependencies.  This PR lays the necessary groundwork for those features.

The old `spec.yaml` format continues to be supported, but is now considered a legacy format, and Spack will opportunistically convert these to the new `spec.json` format.
2021-09-09 01:48:30 -07:00
..
bash fix setup-env.sh on older linux zsh (#21721) 2021-03-10 09:44:50 -08:00
bootstrap/github-actions Bootstrap clingo from binaries (#22720) 2021-08-18 11:14:02 -07:00
csh copyrights: update all files with license headers for 2021 2021-01-02 12:12:00 -08:00
docker Add New Build Containers Workflow (#24257) 2021-08-06 15:53:46 -07:00
docs/docker/module-file-tutorial copyrights: update all files with license headers for 2021 2021-01-02 12:12:00 -08:00
gitlab Update pinned OpenSSL version to 1.1.1l (#25787) 2021-09-06 16:46:41 +00:00
keys update tutorial public key 2021-04-14 23:53:07 -07:00
logo
qa Fix fish test "framework" (#25242) 2021-08-27 10:52:00 +02:00
templates fixing small bug that a line of spack monitor commands are still produced (#25366) 2021-08-24 05:48:16 +00:00
setup-env.csh Introduce a SPACK_PYTHON environment variable (#21222) 2021-02-12 10:52:44 -08:00
setup-env.fish setup-env: allow users to skip slow parts (#24545) 2021-07-08 17:07:26 +02:00
setup-env.sh setup-env: allow users to skip slow parts (#24545) 2021-07-08 17:07:26 +02:00
setup-tutorial-env.sh Tab to spaces (#22362) 2021-03-18 06:20:06 +00:00
spack-completion.bash specs: move to new spec.json format with build provenance (#22845) 2021-09-09 01:48:30 -07:00