Macaulay2 / Macaulay2/M2

Bug in generating example responses

Open
#4,311 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Making updates to the docs I find I am unable to rebuild and view the examples for this docs node.

If I comment out all but the first two lines I see the doc nodes that I expect (which are the ones that already existed prior to this change). If I add in a third line, The example renders as having one more empty input regardless of what the line was - and no output. If I add in a fourth line the example rendering breaks.

Here is a PR with the example that is causing me problems https://github.com/Macaulay2/M2/pull/4310
Talking with @mahrud he suspects a genuine bug related to how example responses are cached.

I can run the example code in M2 directly with no problem as in:

This example works locally for me as in :

```
i1 : F = QQ^4
wp = wedgeProduct(1, 1, F)
L = exteriorPower(1, F)
R = exteriorPower(1, F)
wp * (L_0 ** R_0)
wp * (L_0 ** R_1)

4
o1 = QQ

o1 : QQ-module, free

o2 = | 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 |
| 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 |
| 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 |
| 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 |
| 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 |
| 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 |

6 16
o2 : Matrix QQ <-- QQ

4
o3 = QQ

o3 : QQ-module, free

4
o4 = QQ

o4 : QQ-module, free

o5 = 0

6
o5 : QQ

o6 = | 1 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |

6
o6 : QQ
```

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 PR #4310 and reproduce the documentation example-rendering failure described here, comparing the first two lines with versions containing a third and fourth line. Trace the example-response generation and caching path used when rebuilding the docs. Done means the example renders all inputs and outputs correctly after rebuilding.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.