spack/lib/spack
Carson Woods 33752eabb8
Improve package source code context display on error (#37655)
Spack displays package code context when it shouldn't (e.g., on `FetchError`s)
and doesn't display it when it should (e.g., when errors occur in builder classes.
The line attribution can sometimes be off by one, as well.

- [x] Display package context when errors occur in a subclass of `PackageBase`
- [x] Display package context when errors occur in a subclass of `BaseBuilder`
- [x] Do not display package context when errors occur in `PackageBase`,
      `BaseBuilder` or other core code that is not in a `package.py` file.
- [x] Fix off-by-one error for core code (don't subtract one from the line number *unless*
      it's in an actual `package.py` file.

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2023-05-15 13:38:11 -07:00
..
docs concretizer: don't change concrete environments without --force (#37438) 2023-05-14 13:36:03 +02:00
env cc: deal with -Wl,-rpath= without value, deal with NAG (#37215) 2023-05-05 12:16:31 +02:00
external Update archspec to v0.2.1 (#37633) 2023-05-12 18:59:58 +02:00
llnl Add llnl.util.filesystem.find_first (#36083) 2023-03-27 09:42:16 -07:00
spack Improve package source code context display on error (#37655) 2023-05-15 13:38:11 -07:00
spack_installable license year bump (#34921) 2023-01-18 14:30:17 -08:00