errorDepth could match loadDepth sooner, to improve error messages
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
This issue was triaged from bugs/dan/0-errorDepth, one of the 857 files removed from the pre-GitHub bugs/ tree by d2c8d27826 and catalogued in #36. The commentary below was written by Claude (Claude Opus 5, via Claude Code), not by @d-torrance, whose account posted it -- please weigh it accordingly.
The original file, verbatim
maybe we could make errorDepth equal to loadDepth sooner, to improve error messages:
i15 : run ///M2 -q -e 'print (loadDepth,errorDepth); exit 0'///
Macaulay2, version 1.6.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone
(3, 0)
Where it stands today
Unchanged. At startup (loadDepth, errorDepth) is still (3, 0):
$ M2 -q -e 'print (loadDepth,errorDepth); exit 0'
(3, 0)
What the file is after
errorDepth controls how much of the internal call chain an error message reports. While it lags
behind loadDepth, errors raised early carry frames from M2's own startup and library code, which is
noise for a user whose mistake is at the top level. Raising it sooner — to match loadDepth — would
trim messages to the part the user can act on.
Notes for whoever picks this up
The reason it is not simply set at startup is presumably that the internal frames are wanted while
Core itself is loading, when a failure there is a bug in M2 rather than in user input. So the change
is about when the two become equal, not about the final value: some point after Core finishes and
before the user's first expression.
open · disposition issue · source of truth: bug-triage/catalog.tsv
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where loadDepth and errorDepth are initialized and changed during Macaulay2 startup, then reproduce the reported (3, 0) output with M2 -q -e 'print (loadDepth,errorDepth); exit 0'. Trace startup and first-expression error handling to identify a safe point for matching the depths, and verify that early Core failures retain useful internal frames while user-facing errors no longer include startup noise.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100