Skip to content

Update to v2 - #43

Merged
BNAndras merged 10 commits into
exercism:mainfrom
BNAndras:update-to-v2
Oct 7, 2026
Merged

BNAndras merged 10 commits into
exercism:mainfrom
BNAndras:update-to-v2

Conversation

@BNAndras

@BNAndras BNAndras commented Oct 6, 2026

Copy link
Copy Markdown
Member

@BNAndras BNAndras added the x:module/test-runner Work on Test Runners label Oct 6, 2026
@BNAndras
BNAndras requested a review from a team as a code owner October 6, 2026 00:51
@BNAndras BNAndras added the hacktoberfest-accepted Make this PR count for hacktoberfest label Oct 6, 2026
@BNAndras

BNAndras commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Woah, that was a fast CI run. It's usually 25 - 30 seconds.

Comment thread bin/run-tests.sh Outdated
Comment thread .dockerignore Outdated
Comment thread Dockerfile
Comment thread .vimrc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all the repos to have an editor config, this seems like it would be the most appropriate 😆

@BNAndras BNAndras Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, the runner currently skips .vimrc loading when we invoke vim in bin/run.sh. The file is a leftover from the v1 setup where we invoked vim and passed it in manually to load Vader. That's not needed since I moved loading Vader into lib/runner.vim.

This avoids an issue where someone pulls the test runner into a Vim session but forgot to point Vim at the local .vimrc file first. I did a couple of times last week. The test runner will work without additional configuration. This also keeps the test runner configuration bits inside runner.vim itself.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This however gave me an idea. Vader is only a couple of kilobytes. We could provide a copy and a .vimrc in each exercise that loads Vader and the student code dynamically, running the tests. Students only need Vim installed so vim -N -u .vimrc could reliably run the tests from within the exercise folder. That means we can add Vim script to exercism test. If a student wants to use their own settings, they can just start Vim regularly and not use the local settings which are specific to running the tests with the Vader.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that'd be neat! awk, bash, jq, gdscript and more ship runner code. GDScript just got stub project files. Having a .vimrc for the exercises would be cool.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would overlay existing configs though, right? It might be annoying to have my personal root .vimrc ignored.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ignores the local .vimrc unless you pass it in using -U and just runs your personal .vimrc. So you could do that for when you're editing your solution and then still use exercism test to test the code in a separate Vim session. If you wanted to test the code in a different setup, then the local .vimrc could be a starting-off point for customization or you just install Vader in your personal .vimrc and then run the test code how you want.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend not calling it ".vimrc" -- that's confusing for vim users. Something exercism-related perhaps.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably runner.vim or run-tests.vim. We can discuss this further on the forums and brainstorm what all might be useful to include if we were to provide something to facilitate the testing workflow.

@glennj

glennj commented Oct 6, 2026

Copy link
Copy Markdown

I love to see the runner implemented in the language!

@BNAndras
BNAndras merged commit be29e6a into exercism:main Oct 7, 2026
1 check passed
@BNAndras
BNAndras deleted the update-to-v2 branch October 7, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Make this PR count for hacktoberfest x:module/test-runner Work on Test Runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants