exercism / exercism/configlet

all: tell the user if their configlet version is outdated

Open
#408 0 comments 0 reactions 0 assignees View on GitHub
kind: feature
Dominant language
Nim
Stars
23
Forks
17
Avg merge
13h 57m
Merged PRs (30d)
1

Description

I'd like configlet to tell the user if their configlet version is out of date.

Implementation sketch:
- Store a file locally that contains a timestamp. For example on Linux in `.cache/exercism/configlet/last_update_check.txt` or similar.
- Running a configlet command should check that local timestamp. If more than e.g. 1 day has elapsed, and the `--offline` flag was not provided, configlet makes a request to determine the latest version (perhaps hitting https://raw.githubusercontent.com/exercism/configlet/main/configlet.version, or the GitHub API) .
- If there is an update, advise the user to run `fetch_configlet` (or `configlet upgrade`, if we restore that functionality).

Possible HTTP helper modules:
1. [std/httpclient](https://nim-lang.org/docs/httpclient.html), with `-d:ssl`
2. [treeform/puppy](https://github.com/treeform/puppy), without `-d:ssl`. This uses `libcurl` on macOS/Linux, and the `win32 WinHttp` API on Windows.

There might be some complications regarding static linking, but we have to think about this for the online `configlet lint` checks too (Exercism-wide UUID checking, and checking that a `forked_from` value is valid).

---

This issue has been in the back of my mind for a while - I think there was some discussion about it for `configlet-v2`. But I was reminded of it by today's call, where updating the Exercism CLI was mentioned.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the configlet command entry points and the existing --offline handling, then review how online configlet lint checks are planned. Done means a locally cached update-check timestamp limits version requests, --offline prevents the request, and an outdated version advises running fetch_configlet or configlet upgrade.

Written by the indexing model from the issue text.

Assessment

Tech stack
nim
Domain
cli, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.