Vim 9 Feature Set in Unit Test

I use Vim 9 to do the exercises in the VImscript track. All works well except when I get to the Nucleotide count. It errors out when I try to return a dictionary.

Digging into the problem, I realized the Vim version used in testing our submissions may be behind on Vim 9 features. — (realization)

Is there a way to ensure the current Vim 9 features at test runtime? — the second option would be to create a new track; which I think is an overkill for the transition between legacy vimscript and vim9script.

The supported Vim version is determined by the Vim test runner, which is a Docker image built from this Dockerfile: vimscript-test-runner/Dockerfile at main · exercism/vimscript-test-runner · GitHub

Do you see anything that we should be changing there?

Yeah, I noticed it comes from the Docker file. Now this is where I don’t know much about the constituents of the Docker file to know which distro ships with Vim 9.

Is vim9 script backwards compatible? Will this be a quick fix or something larger?

Vim9script is a thing on its own, but it runs in all Vim versions > 8.2. It’s currently being worked on, so features come alive in subsequent releases of Vim 9.

It’s backward compatible as well. You can run legacy Vimscript in Vim 9. If you want a script to be interpreted as Vim9, you’d have to prefix those aspects of your script with vim9script. There’s even a possibility to interlace both versions of the language.

Per what to do — I doubt it would be much. We just need to find a docker image with a linux distro which ships with Vim 9. I doubt there’d be many of them seeing that Vim 9 is fairly new. This is one of those things where the test runner — if the docker image is being updated periodically to more recent versions — will catch up with time