spack/lib/spack
Todd Gamblin 800229a448 package_hash: fix handling of multimethods and add tests
Package hashing was not properly handling multimethods. In particular, it was removing
any functions that had decorators from the output, so we'd miss things like
`@run_after("install")`, etc.

There were also problems with handling multiple `@when`'s in a single file, and with
handling `@when` functions that *had* to be evaluated dynamically.

- [x] Rework static `@when` resolution for package hash
- [x] Ensure that functions with decorators are not removed from output
- [x] Add tests for many different @when scenarios (multiple @when's,
      combining with other decorators, default/no default, etc.)

Co-authored-by: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com>
2022-01-12 06:14:18 -08:00
..
docs Fix table formatting (#28037) 2021-12-23 16:02:09 +01:00
env Support packages which need to explicitly refer to dpcpp by name (#27168) 2021-12-02 15:49:20 -08:00
external unparser: implement operator precedence algorithm for unparser 2022-01-12 06:14:18 -08:00
llnl Set backup=False by default in filter_file (#28036) 2021-12-23 16:02:09 +01:00
spack package_hash: fix handling of multimethods and add tests 2022-01-12 06:14:18 -08:00