Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: tell the user if their configlet version is outdated #408

Open
ee7 opened this issue Sep 1, 2021 · 0 comments
Open

all: tell the user if their configlet version is outdated #408

ee7 opened this issue Sep 1, 2021 · 0 comments
Labels
kind: feature User-facing enhancement

Comments

@ee7
Copy link
Member

ee7 commented Sep 1, 2021

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, with -d:ssl
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature User-facing enhancement
Projects
None yet
Development

No branches or pull requests

1 participant