We’re pleased to announce that Version 3.1.0 of the CLI has been released
This new version allows you to submit a solution without specifying the files. You can now submit a solution by running exercism submit
(not specifying any files) and it should automatically submit the correct files. This has been the most requested CLI feature for years, so we’re really excited to be able to support this. Our thanks go out to @André Santos who implemented this feature, and to @ekingery for streamlining our release process and @kytrinyx for building the release.
Upgrading
To upgrade your CLI to the latest version, simply run exercism upgrade
. This should update your local CLI binary to the latest version. Unfortunately, you can’t (yet) use exercism upgrade
on ARM-based Macs, but if you install Rosetta, you should be able to download and use the x86-64 macOS binary. We’ll be adding support for the macOS ARM chipset in a future update.
If you want to use this feature for any solution you’ve downloaded before Exercism v3 was released, you’ll need to re-download them.
Implementation
This new feature uses the fact that a downloaded solution has a .metadata/config.json
file, provided the solution was downloaded post Exercism v3 launch. This file contains a files.solution
key which value is an array with the exercise’s solution file name(s). These solution files are the files you are expected to edit to solve the exercise (they’re also known as stub files ). When you run exercism submit
, the CLI will look for this file and if it is present, submit the files listed in its files.solution
array.
You can still submit specific files the way you’ve always done, simply by running: exercism submit <file1> <file2> ...
You’ll need to use this if you’ve added additional files or want to submit non-solution files.If you’re interested in the how this was implemented, you can view the code in this PR.