Skip to content

Releases: exercism/configlet

4.0.0-beta.4

01 Jun 05:18
5a2937d
Compare
Choose a tag to compare

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

  • 62cb57b sync: remove source or source_url if removed in prob-specs (#609)

4.0.0-beta.3

20 May 14:01
8ee6b5d
Compare
Choose a tag to compare

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

  • 4e06d08 exec: remove trailing slash from to-be-cloned URL (#600)

Internal

Full Changelog: 4.0.0-beta.2...4.0.0-beta.3

4.0.0-beta.2

06 May 16:30
098985d
Compare
Choose a tag to compare

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 a canonical-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

  • 8f8f76c sync(filepaths): sync editor field when missing (#576)

Full Changelog (including changes that aren't user facing): 4.0.0-beta.1...4.0.0-beta.2

4.0.0-beta.1

13 Apr 22:53
98b2627
Compare
Choose a tag to compare

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 using configlet sync.
  • The zero-option behavior is faster, as a git pull involves much less data transfer than a git 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 upstream main 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

02 Mar 20:38
23a986d
Compare
Choose a tag to compare

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 lacks tags or key_features.
  • No longer exit with an error when files.example and files.examplar overlap, or when files.solution and files.test overlap for d and plsql.

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 and plsql tracks
  • fea7bcc lint: allow overlap of files.example and files.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

27 Jan 16:00
dd683e6
Compare
Choose a tag to compare

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

  • 4ccb2e3 sync: fix null handling when updating filepaths/metadata (#501)

Full Changelog (including changes that aren't user-facing):
4.0.0-alpha.35...4.0.0-alpha.36

4.0.0-alpha.35

18 Dec 16:10
d290a30
Compare
Choose a tag to compare

This is a big configlet release, with two new features:

  • configlet sync can now sync docs and metadata from problem-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

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

22 Oct 12:51
d204965
Compare
Choose a tag to compare

Enhancements

  • 36a07d8 lint(track_config): disallow a difficulty of 0 (#447)
  • Decrease binary size by about 25% on all platforms (see #341)

4.0.0-alpha.33

13 Oct 11:00
fb9930b
Compare
Choose a tag to compare

This is a release for configlet lint.

See here for the new output that configlet lint produces, compared to the previous release (at the time of release).

See here for the list of checks that configlet lint currently performs.

Enhancements

  • ea478ef lint(track_config): check hello-world status (#436)
  • 2a6bfa9 lint: check files key in track-level config (#435)
  • 6afe452 lint(track_config): check concept directory names are in config (#437)

4.0.0-alpha.32

05 Oct 10:53
b33bddc
Compare
Choose a tag to compare

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 in foregone
  • 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

Bug fixes