Releases: exercism/configlet
4.0.0-beta.4
This is a small release to make configlet sync
correctly update
metadata in an edge case.
If a source
or source_url
key/value pair was removed from an
exercise's metadata.toml
file in exercism/problem-specifications
,
configlet sync -u
would incorrectly set an existing corresponding
.meta/config.json
value to the empty string.
This would cause configlet lint
to indicate an error, because
a source
value must be a non-blank string, and a source_url
value
must be a URL.
With this release, configlet sync -u
will now remove any source
or
source_url
key/value pair that was removed in prob-specs.
You should upgrade to this configlet release to correctly update the
metadata of a pre-existing grade-school
exercise (due to
exercism/problem-specifications@05999f3).
If you have already used a previous configlet version to update those
metadata, please remove the source_url
key/value pair of
grade-school
manually.
Bug fixes
4.0.0-beta.3
This release makes configlet info
work more like configlet sync
, using the
cached problem-specifications
repo that configlet sync
has used since
configlet 4.0.0-beta.1
.
So configlet info
now uses prob-specs data that is updated at run time, rather
than compile time, and the command gains an -o, --offline
option. Previously,
configlet info
used problem-specifications
data that we baked into the binary.
Enhancements
Bug fixes
Internal
- 85e262c fmt, info, lint, sync: extract common types (#564)
- f2ab147 info: refactor (#596)
- 54f814c github(bin, workflows): bump GCC from 9.4 to 10.3 (#591)
Full Changelog: 4.0.0-beta.2...4.0.0-beta.3
4.0.0-beta.2
The main changes in this release:
-
lint, sync, fmt: Support the new
files.invalidator
field, which allows a
track to specify additional files that, when changed, cause a solution to
become outdated. -
info: Make the output of unimplemented Practice Exercises more useful, grouping
exercises by whether or not they have acanonical-data.json
file.
User-facing Enhancements
- 6b6e2c2 info: show whether unimplemented exercises have canonical data (#567)
- 152a953 lint, sync, fmt: support the
files.invalidator
field (#577) - 0832f81 lint(exercises): check
files.editor
field (#585) - 146d41c info(prob_specs_exercises): add
killer-sudoku-helper
(#566)
Internal
- 8d6fe69 bump Nim from 1.6.4 to 1.6.6 (released 2022-05-05)
Bug fixes
Full Changelog (including changes that aren't user facing): 4.0.0-beta.1...4.0.0-beta.2
4.0.0-beta.1
This is a big release for configlet sync
, making it much more ergonomic - it now caches problem-specifications.
configlet sync
improvement
Before this release, the default behavior of configlet sync
was to clone exercism/problem-specifications
and delete it afterwards. The -p, --prob-specs-dir
and -o, --offline
options influenced the behavior as shown in the below table.
--prob-specs-dir given? |
--offline given? |
Behavior |
---|---|---|
Clone prob-specs, and delete it afterwards | ||
✔️ | Use the given prob-specs dir; error if outdated | |
✔️ | ✔️ | Use the given prob-specs dir; don't check whether outdated |
✔️ | Error: -p must be provided when -o is given |
This was a simple and robust initial implementation, but not ergonomic for the typical use case - the zero-option behavior is slow and wasteful. Most track maintainers would probably want to use both --offline
and --prob-specs-dir
nearly all the time, especially because we often want to run several configlet sync
commands in quick succession.
With this release, configlet sync
now caches problem-specifications on the user's machine, behaving as follows:
Cache hit? | --offline given? |
Behavior |
---|---|---|
Clone prob-specs, and don't delete it afterwards | ||
✔️ | Use cached prob-specs, and git pull in it |
|
✔️ | ✔️ | Use cached prob-specs, and don't git pull in it |
✔️ | Error: local prob-specs not found, and won't clone |
This optimizes for the convenience of configlet sync
and configlet sync --offline
. That is, to perform an offline sync, the user no longer needs to also write a path to a prob-specs directory. In fact, this release also removes the --prob-specs-dir
option entirely; its remaining usefulness is not worth the added complexity (both in the code, and the help message).
Other improvements:
- You don't need to
git pull
in your prob-specs directory before usingconfiglet sync
. - The zero-option behavior is faster, as a
git pull
involves much less data transfer than agit clone
.
Despite the --prob-specs-dir
removal, note that you can still:
- Sync from an older prob-specs commit, by checking out that commit in the cached repo and then using
--offline
. This can be helpful when, for example, creating atomic commits. We require the commit to exist on the upstreammain
branch. - Sync when you have no network connection, and your only copy of problem-specifications is outside the cache directory (by copying it to the cached location, and then using
--offline
). Configlet will tell you this if you use--offline
without a cached prob-specs.
The path to the cached prob-specs is:
$PATHSTART/exercism/configlet/problem-specifications
where the value of $PATHSTART
is given by this table:
Platform | $PATHSTART |
---|---|
Windows | getEnv("LOCALAPPDATA") |
macOS | getEnv("XDG_CACHE_HOME", getEnv("HOME") / "Library/Caches") |
Other | getEnv("XDG_CACHE_HOME", getEnv("HOME") / ".cache") |
and getEnv
returns the value of the environment variable with the name of the first parameter (or if that does not exist, the value of the second parameter).
For example, on Linux, the cached path is typically:
~/.cache/exercism/configlet/problem-specifications
Checksums
We also now include a checksums file in the release assets. You can use this file to verify that a configlet release archive was downloaded correctly. For example, on Linux:
$ sha256sum --check --ignore-missing configlet_4.0.0-beta.1_checksums_sha256.txt
configlet-linux-64bit.tgz: OK
In a future release, we plan to sign this file.
No longer "alpha"
Configlet has stayed "alpha" since January 2021 - partly for the freedom to make breaking changes while we converge on a CLI design, but partly from inertia. In reality, configlet has been working reliably for a long time; the latest "alpha release" ran in CI on every PR on every track, and was downloaded whenever a user ran a fetch-configlet
script.
We're getting closer to releasing 4.0.0, but we're starting beta
releases in the meantime - this better conveys the current situation, and that configlet is not "dangerous alpha software".
Declaring beta
at this exact moment also helps us to distinguish configlet versions that have the new caching behavior (and lack the --prob-specs-dir
option).
User-facing Enhancements
- f7c1225 build: upload checksums file (#552)
- b54fe48 info(prob_specs_exercises): add
state-of-tic-tac-toe
(#554) - f01a5ff exec: cloneExercismRepo: clone a single branch by default (#546)
- 4819f8d sync: cache prob-specs repo, and remove
--prob-specs-dir
option (#540)
Full Changelog (including changes that aren't user facing):
4.0.0-alpha.37...4.0.0-beta.1
4.0.0-alpha.37
This release improves configlet's linting of the track-level config.json
file.
Summary
- Enforce that a corresponding directory exists for each Concept Exercise, Practice Exercise, and Concept in the track-level
config.json
file. - Improve error messages when the track-level
config.json
file lackstags
orkey_features
. - No longer exit with an error when
files.example
andfiles.examplar
overlap, or whenfiles.solution
andfiles.test
overlap ford
andplsql
.
Enhancements
- d0cd08c lint: error on missing concept/exercise files (#522)
- a71637f lint: add annotation for key features in
config.json
- 09d5108 lint: add annotation for tags in
config.json
- 856ad41 lint: link to docs on exercism.org, not GitHub (#520)
- aa22e35 lint: allow overlap of solution and test files for
d
andplsql
tracks - fea7bcc lint: allow overlap of
files.example
andfiles.exemplar
values
Full Changelog (including changes that aren't user facing):
4.0.0-alpha.36...4.0.0-alpha.37
4.0.0-alpha.36
This release mainly focuses on improving the advisory messages at the end of configlet lint
, and the output of configlet --help
.
Enhancements
- 9751891 cli: add configlet description to help message (#510)
- 80119c3 cli: set help text at compile time (#509)
- a6c27d3 cli: avoid the word "generate" in uuid help (#508)
- fe3e7e4 lint: clarify the need to update configlet (#504)
- 9296b43 info: move
accumulate
to deprecated exercises (#497) - 816a118 lint: advise that warnings may not become errors (#490)
- fd78c1b lint(track_config): optimize concept cycle checking slightly (#489)
Bug fixes
Full Changelog (including changes that aren't user-facing):
4.0.0-alpha.35...4.0.0-alpha.36
4.0.0-alpha.35
This is a big configlet release, with two new features:
configlet sync
can now sync docs and metadata fromproblem-specifications
(see the docs).configlet fmt
was added, for formatting exercise.meta/config.json
JSON files (see the docs).
The new configlet --help
message is
Usage:
configlet [global-options] <command> [command-options]
Commands:
fmt Format the exercise 'meta/config.json' files
generate Generate Concept Exercise 'introduction.md' files from 'introduction.md.tpl' files
info Print some information about the track
lint Check the track configuration for correctness
sync Check or update Practice Exercise docs, metadata, and tests from 'problem-specifications'.
Check or populate missing 'files' values for Concept/Practice Exercises from the track 'config.json'.
uuid Output new (version 4) UUIDs, suitable for the value of a 'uuid' key
Options for fmt:
-e, --exercise <slug> Only operate on this exercise
-u, --update Prompt to write formatted files
-y, --yes Auto-confirm the prompt from --update
Options for sync:
-e, --exercise <slug> Only operate on this exercise
-p, --prob-specs-dir <dir> Use this 'problem-specifications' directory, rather than cloning temporarily
-o, --offline Do not check that the directory specified by --prob-specs-dir is up to date
-u, --update Prompt to update the seen data that are unsynced
-y, --yes Auto-confirm prompts from --update for updating docs, filepaths, and metadata
--docs Sync Practice Exercise '.docs/introduction.md' and '.docs/instructions.md' files
--filepaths Populate empty 'files' values in Concept/Practice exercise '.meta/config.json' files
--metadata Sync Practice Exercise '.meta/config.json' metadata values
--tests [mode] Sync Practice Exercise '.meta/tests.toml' files.
The mode value specifies how missing tests are handled when using --update.
Allowed values: c[hoose], i[nclude], e[xclude] (default: choose)
Options for uuid:
-n, --num <int> Number of UUIDs to generate
Global options:
-h, --help Show this help message and exit
--version Show this tool's version information and exit
-t, --track-dir <dir> Specify a track directory to use instead of the current directory
-v, --verbosity <verbosity> The verbosity of output.
Allowed values: q[uiet], n[ormal], d[etailed] (default: normal)
New features
- 1fd2a46 sync: handle docs, metadata, and filepaths (#366)
- 4a88c13 fmt: add initial implementation (#468)
Enhancements
- ee73561 cli, README: add command descriptions to help message (#469)
- 7b7c296 sync(probspecs): fix message for missing prob-specs dir (#471)
- f798115 info: omit deprecated exercises in unimplemented exercises list (#474)
Full Changelog: 4.0.0-alpha.34...4.0.0-alpha.35
4.0.0-alpha.34
4.0.0-alpha.33
4.0.0-alpha.32
This release adds the configlet info
command, which aims to provide useful information to track maintainers.
The initial implementation prints the following information for a track:
- Every concept that is not a prerequisite for any Practice Exercise
- Every concept that is not practiced by any Practice Exercise
- The difference between those two lists: concepts that are a prerequisite, but aren't practiced
- Exercises from
exercism/problem-specifications
that are neither implemented nor inforegone
- The number of exercises and concepts
In the future, the command will likely have various options to control what output is shown.
Discussion: #180
New features
- 626506f21556 info: add initial implementation (#181)
Bug fixes
- 06457bca8281 lint(track_config): fix error for missing track config (#429)