Description
The dotnet nano umbrella tool wraps external prebuilt tools (today nanoff) and resolves them in a defined order: a binary bundled in the tool package, then a globally/locally installed tool or one on PATH, then a download of a pinned release to a user cache (verified by version/hash). The third step — the downloader — is not implemented: when nothing resolves, dotnet nano flash currently fails with a clear "install nanoff" message instead of fetching the pinned release described in the embedded nano-tools.json manifest. Implementing the downloader makes the toolchain a single install with deterministic, CI-reproducible external-tool provisioning.
How to solve the problem
Implement the IToolDownloader step in the external-tool resolver:
- Fetch the pinned release for an external tool from the source declared in
nano-tools.json (for nanoff, the pinned NuGet package version), into a per-user cache.
- Verify the download by version and hash before use; reuse the cached copy on subsequent runs.
- Wire it into
ExternalToolResolver so resolution falls through to download when the bundled/installed/PATH lookups miss, and surface clear progress/errors.
Acceptance: with nanoff neither bundled, installed, nor on PATH, dotnet nano flash downloads the pinned nanoff release to the cache (verified by version/hash), runs it, and reuses the cache on later runs.
Describe alternatives you've considered
- Keep the current behavior (fail with an "install nanoff" message). Acceptable as a stopgap, but it means the umbrella tool is not a single self-provisioning install, which is the stated goal of the external-tool layer.
- Require
nanoff as a hard prerequisite. Pushes provisioning onto the user and CI; the pinned-download model is deterministic and reproducible.
Additional context
Description
The
dotnet nanoumbrella tool wraps external prebuilt tools (todaynanoff) and resolves them in a defined order: a binary bundled in the tool package, then a globally/locally installed tool or one onPATH, then a download of a pinned release to a user cache (verified by version/hash). The third step — the downloader — is not implemented: when nothing resolves,dotnet nano flashcurrently fails with a clear "install nanoff" message instead of fetching the pinned release described in the embeddednano-tools.jsonmanifest. Implementing the downloader makes the toolchain a single install with deterministic, CI-reproducible external-tool provisioning.How to solve the problem
Implement the
IToolDownloaderstep in the external-tool resolver:nano-tools.json(fornanoff, the pinned NuGet package version), into a per-user cache.ExternalToolResolverso resolution falls through to download when the bundled/installed/PATH lookups miss, and surface clear progress/errors.Acceptance: with
nanoffneither bundled, installed, nor onPATH,dotnet nano flashdownloads the pinnednanoffrelease to the cache (verified by version/hash), runs it, and reuses the cache on later runs.Describe alternatives you've considered
nanoffas a hard prerequisite. Pushes provisioning onto the user and CI; the pinned-download model is deterministic and reproducible.Additional context
tools/nano.tools/nanoin the SDK repo; self-contained. Smaller than the other items.