summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <gamblin2@llnl.gov>2021-07-31 22:15:33 -0700
committerGitHub <noreply@github.com>2021-08-01 05:15:33 +0000
commitab5954520fff2e574c99dd1ab18ac076838e2fdb (patch)
tree43d7f99ca9ab7f249968031f4e6a86874ca8a11b /var
parent1e708bdb455b84eae36747a2d2f6eec2bb938c55 (diff)
downloadspack-ab5954520fff2e574c99dd1ab18ac076838e2fdb.tar.gz
spack-ab5954520fff2e574c99dd1ab18ac076838e2fdb.tar.bz2
spack-ab5954520fff2e574c99dd1ab18ac076838e2fdb.tar.xz
spack-ab5954520fff2e574c99dd1ab18ac076838e2fdb.zip
spack diff: make output order deterministic (#25169)
The output order for `spack diff` is nondeterministic for larger diffs -- if you ran it several times it will not put the fields in the spec in the same order on successive invocations. This makes a few fixes to `spack diff`: - [x] Implement the change discussed in https://github.com/spack/spack/pull/22283#discussion_r598337448 to make `AspFunction` comparable in and of itself and to eliminate the need for `to_tuple()` - [x] Sort the lists of diff properties so that the output is always in the same order. - [x] Make the output for different fields the same as what we use in the solver. Previously, we would use `Type(value)` for non-string values and `value` for strings. Now we just use the value. So the output looks a little cleaner: ``` == Old ========================== == New ==================== @@ node_target @@ @@ node_target @@ - gdbm Target(x86_64) - gdbm x86_64 + zlib Target(skylake) + zlib skylake @@ variant_value @@ @@ variant_value @@ - ncurses symlinks bool(False) - ncurses symlinks False + zlib optimize bool(True) + zlib optimize True @@ version @@ @@ version @@ - gdbm Version(1.18.1) - gdbm 1.18.1 + zlib Version(1.2.11) + zlib 1.2.11 @@ node_os @@ @@ node_os @@ - gdbm catalina - gdbm catalina + zlib catalina + zlib catalina ``` I suppose if we want to use `repr()` in the output we could do that and could be consistent but we don't do that elsewhere -- the types of things in Specs are all stringifiable so the string and the name of the attribute (`version`, `node_os`, etc.) are sufficient to know what they are.
Diffstat (limited to 'var')
0 files changed, 0 insertions, 0 deletions