tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Cli: louise self update — install prebuilt releases from the forge (issue #284)

The command discovers the latest successful `release` run on a version
tag over the forge's MessagePack API (`--version` picks a tag),
downloads its artifact, verifies the server-reported sha256 of the zip
and the release's sha256 of the tarball inside, extracts, runs the
staged binary's `--version` (it must be the tag's), and only then
replaces: the runtime archives first, the compiler last, each a single
rename over the old file — a crash mid-install never leaves the
directory without archives, and the old compiler runs until the new
one is wholly there. `--check` reports without changing anything,
`--dry-run` stops before the renames, `--force` allows a downgrade or
a reinstall.

The name is `self update`, not the issue's `louise update`: that
command re-resolves git dependencies (ADR 0020). `self` follows
rustup's spelling.

Transport: ureq with rustls (ring) and the Mozilla roots compiled in —
tob's stack (its src/api.rs is the reference this client follows): no
OpenSSL, static-friendly, and versions the workspace already pins.
Shelling out to curl would make a runtime dependency of what the
compiler does not already need. The API's only format is MessagePack
(rmp-serde); upload-artifact's zip is read with the zip crate (no
`unzip` to rely on); sha2 is the one hash; the tar.xz is extracted
with `tar`, present on every host the compiler targets (a C toolchain
is already required). HTTPS only.

The token, first match wins: LOUISE_TOKEN, TOBOGGAN_TOKEN, the host's
token in tob's ~/.config/tob/hosts.toml (`tob auth login`), or none —
a 401 while the repository is `internal`, with the error saying so.

The version is the workspace's, 0.0.0 → 0.1.0: `louise --version`
prints it, release tags name it, the update compares (semver triples
only; pre-release tags are skipped). git-describe was the alternative;
a manifest version is what clap prints and the release smoke test can
check, and the tag discipline release.yml documents.

Discovery is one function, `discover()`; toboggan#94's real releases
replace it alone. LOUISE_UPDATE_HOST/REPO/WORKFLOW override the target
for tests and forks. The ignored `live_*` tests ran read-only against
toboggan.cloud: discovery over HTTPS+MessagePack with tob's token, and
an artifact download whose size and sha256 matched the server's.

olivier · il y a 1 mois · 578928d2e324d1be4ac30cf7a1811d729bb00627

Parents 78ad6db

6 fichiers modifiés, 1462 ajouts, 21 suppressions