Macaulay2 / Macaulay2/M2

Issues with new M2-level Error class

Open
#4,276 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Interpreter
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

I've been playing with the M2-level Error class @d-torrance recently introduced, the goal being to merge it with my own version of it which is used in the Macaulay2Web interface to have pretty error messages.
In the meantime, I've found a few issues which I'll enumerate in this thread.
Let's start with this one: incorrect location (it's fooled by the annoying M2-level errors in robust.m2, which one day should go...)

i1 : a+b
stdio:1:1:(3):[1]: error: no method for binary operator + applied to objects:
            a (of class Symbol)
      +     b (of class Symbol)

i2 : last trap(a+b)

o2 = no method for binary operator + applied to objects:
            a (of class Symbol)
      +     b (of class Symbol)

o2 : Error

i3 : locate oo

o3 = ../../Macaulay2/m2/robust.m2:100:25-100:66

o3 : FilePosition

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the M2-level Error class and the robust.m2 path shown in the example; reproduce a+b followed by last trap(a+b), then inspect what locate oo uses to report robust.m2💯25-100:66. Done means the resulting FilePosition points to the original error location rather than the misleading robust.m2 errors.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.