Macaulay2 / Macaulay2/M2

multi-line functions break generateAssertions

Open
#3,413 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Unless this [test](https://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/tests/normal/schenck-book-7.m2) was edited manually, I believe at some point `generateAssertions` supported multiline functions in its input, but now it is broken:
```m2
i1 : generateAssertions ///
f = x -> (
x + x)
f(1)
///

o1 =
assert( (try f = x -> ( else oops) === oops );
assert( (try x + x) else oops) === oops );
assert( (try f(1) else oops) === oops );
```

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 linked schenck-book-7.m2 test and reproduce the multiline-function example in Macaulay2. Trace the generateAssertions entry point to determine why the input is split incorrectly, then update the relevant test so multiline functions produce the expected assertions and the test passes.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.