Skip to content

Provision the pinned SDK and analysis tools from the checkout launcher - #24

Merged
Kristof Roomp (mcroomp) merged 2 commits into
mainfrom
feature/launcher-auto-provisioning
Nov 22, 2026
Merged

Kristof Roomp (mcroomp) merged 2 commits into
mainfrom
feature/launcher-auto-provisioning

Conversation

@mcroomp

@mcroomp Kristof Roomp (mcroomp) commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The checkout launcher (TlaLink.ps1) now provisions what it needs on first use, so a fresh clone works without separate setup steps. Downloads go into the checkout's ignored .tools cache.

  • Exact SDK: if neither .tools\dotnet\<version>\distribution nor the PATH host has the global.json SDK, the launcher downloads it.
    • The archive comes from the official .NET release metadata (builds.dotnet.microsoft.com).
    • Its SHA512 is verified against the published value before extraction.
    • The SDK is installed into the ignored .tools\dotnet\<version>\distribution. Nothing machine-wide changes.
  • Analysis tools: before any command other than toolchain, the launcher runs toolchain restore for each pinned tool (java, tlc, dafny, apalache, p) whose entrypoint is missing from .tools.
    • It uses the existing archive pins and verification.
    • A warm run does only a few file-existence checks.
  • Opt-out: TLALINK_AUTO_PROVISION=false (or 0) disables both steps and keeps setup fully explicit.
  • Restore default: toolchain restore --directory now defaults to the checkout's .tools when run from a checkout build. A deployed tool still needs --directory.
  • Output directories: Files.WriteNew now creates a missing parent directory, so accept --output .\artifacts\receipts\x.json no longer fails with a raw TL900 path error on first use. Its never-overwrite contract is unchanged, and the fix covers every single-file --output.

The CLI's analysis commands still never install tools, and SDK discovery without -Provision stays nonmutating. AGENTS, README, REFERENCE and the scripts README now describe the launcher behaviour.

Validation

  • tests\Toolchain.Tests.ps1: 10/10 passed. New tests cover the opt-out, an unpublished SDK failing without leaving an installation, and missing-tool detection.
  • Core suite --core: 470/470 passed, including new tests for the default restore directory and output directory creation.
  • From a clean .tools with no 10.0.204 SDK on the machine, .\TlaLink.ps1 doctor --project .\examples\Workflow\tlalink.project.json --scenario lanes provisioned the SDK plus all five tools and passed in about 2 minutes. A warm rerun took about 4 seconds with no provisioning.

kristofr and others added 2 commits November 21, 2026 17:23
TlaLink.ps1 now makes a fresh checkout usable without separate setup:

- When neither .tools\dotnet\<version>\distribution nor the PATH host has the
  exact global.json SDK, the launcher downloads it from the official .NET
  release metadata, verifies the published SHA512 and installs it into the
  ignored .tools cache.
- Before any command other than `toolchain`, it runs `toolchain restore` for
  each pinned analysis tool (java, tlc, dafny, apalache, p) whose entrypoint
  is missing from the checkout's .tools.
- TLALINK_AUTO_PROVISION=false (or 0) disables both steps.

The CLI's analysis commands still never install tools; SDK discovery without
-Provision remains nonmutating. `toolchain restore --directory` now defaults
to the checkout's .tools when run from a checkout build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`accept --output .\artifacts\receipts\x.json` failed with a raw TL900 path error
when the receipts directory did not exist yet. Files.WriteNew now creates the
containing directory, keeping its never-overwrite contract. This covers every
single-file --output (accept, expand, links, inspect-source, symbols).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mcroomp
Kristof Roomp (mcroomp) merged commit 22d3014 into main Nov 22, 2026
2 checks passed
@mcroomp
Kristof Roomp (mcroomp) deleted the feature/launcher-auto-provisioning branch November 22, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant