Hello all, I wanted to introduce the Nim community to tissue, an automation tool to help speed up debugging Nim compiler and stdlib issues. It can test snippets posted in Nim issues and comments on Github.
Some examples:
tissue -o 5678
Gets the first code snippet from issue #5678 from the description, compiles with nim and nim_temp (if compiled) and generates a log file in the local logs directory containing all compilation results as well as the entire Github conversation. Use flags like -s# to pick the nth snippet or -C# to pick a snippet from a comment instead.
There's a bunch of command line flags to modify behavior with the goal of quickly running a snippet from Github to reproduce an issue and then make local code changes until issue is fixed. You could also use the -e flag to edit the snippet and rerun tests and then post a workaround quickly.
I personally use tissue to find compiler crash issues which are already fixed in #head:
tissue -pf1 -pl5 -o
This scans the first 5 pages of issues (100 per page), looks for signs of a crash, ICE, internal error in description and then only tests those issues.
By default, tissue only runs on such crashes but if you want to bypass this crash check, the -n flag can be used. Tissue only runs on open issues at this time. It also auto detects required Nim flags such as --threads, --newruntime or cpp or js modes based on issue content. Another flag is -mXX which can force the mode regardless of auto detection.
tissue -mjs 5678
This will test the snippet with nim js and node test.js
There is also the ability to create test cases from snippets with the -aXX flag. The -p flag is still TBD but that will make it super easy to commit that test case and open a PR.
Appreciate any feedback to improve tissue. Hope this encourages more people to contribute and improve the quality of the Nim ecosystem.