diff options
author | Carson Woods <carsonwoods@users.noreply.github.com> | 2023-05-15 16:38:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 13:38:11 -0700 |
commit | 33752eabb876682d9a55589903df4e38f226b710 (patch) | |
tree | 8af4f3e5679297d056f9b61320b5fe42152e8980 /bin | |
parent | f1d1bb9167bd564828bd0f22553b4f195629ee80 (diff) | |
download | spack-33752eabb876682d9a55589903df4e38f226b710.tar.gz spack-33752eabb876682d9a55589903df4e38f226b710.tar.bz2 spack-33752eabb876682d9a55589903df4e38f226b710.tar.xz spack-33752eabb876682d9a55589903df4e38f226b710.zip |
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>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions