Repository navigation
1.19.0
Added
tamp migrate nuke, preview.Tamp.Migrateis now packable, andtamp migrate …runs it at the CLI's own version throughdotnet tool execute(.NET 10 SDK; on older SDKs, install it withdotnet tool install -g Tamp.Migrate). Beyond the C# rewrite, it now rewrites the NUKE build project in place:Nuke.*references and properties go, andTamp.Coreplus the wrapper packages the build uses are added. It writestamp init's bootstrap (tamp.sh,tamp.cmd, anddotnet-tampin the tool manifest, from the same source astamp init), and refuses to run on a dirty git working tree (--allow-dirtyoverrides). A first dogfood on NSwag's NUKE build (docs/nuke-migration/dogfood-nswag.md) found and fixed these silent failures:- the template
Configurationclass - qualified
Serilog.Logcalls - NUKE settings types that silently resolve to Tamp's
Configure<T>and lifecycle hooksSolution.AllProjects, via a newmembermatch kind- a wrong
[GitRepository]row
- the template
Solutionconverts to its path wherever astringis expected, asAbsolutePathalready does and as NUKE'sSolutiondoes, soDotNet.Build(s => s.SetProject(Solution))compiles. It also makes the migrator'sautorowSetProjectFile(Solution)→SetProject(Solution)correct as written. Before, the converted build didn't compile when the argument was aSolution.Tamp.Migrate: the NUKE → Tamp rewriter (#131, ADR 0021 Phase 2a). A separate dotnet tool,tamp-migrate nuke [--root] [--build-dir] [--dry-run] [--package-major], so Roslyn stays out of thetamptool every CI run installs (the packaging ADR 0021 settled). It parses the NUKE build with no restore and no compile, and applies theautorows of the embeddedmapping.yaml. No rule is hardcoded: base class,Main→Execute<T>(args)plus.Default()on the target (across partial files), usings (from a newnamespaces:table), injection attributes, path helpers, the target DSL, andDotNetTasks.*→DotNet.*with every setting rewritten per the mapping. A call that ran a tool becomesProcessRunner.Run(DotNet.X(..))in a statement, or the returned plan inExecutes(() => ..). Every other recognised site gets a// TAMP-MIGRATE(<rule-id>): <what to do>marker and is left alone, including unmapped verbs and settings, tool results that are used, families that aren'tauto, and known gaps.tamp-migration.json/.mdcount each site as applied, assisted, manual or unmapped. A second run changes nothing.
Changed
-
NUKE migration mapping, schema 0.2 (#58, Phase 2 step 1).
docs/nuke-migration/mapping.yamlis now whattamp migrate nukewill apply. Every rule has a stableid, amatchandrewritefrom a closed vocabulary, amarkerfor anything notauto, andverify: the Tamp symbols it relies on. The newtests/Tamp.Migrate.Testschecks those symbols against Tamp.Core, Tamp.NetCli and Tamp.Components by reflection. That check corrected six rows of the reference:CreateOrCleanDirectorymaps toDeleteDirectory().CreateDirectory(), andCopy/Movemap toCopyTo/MoveTo.CopyFile,MoveFileandCreateOrCleanDirectorydon't exist in Tamp.- Serilog
Log.*maps to console output, which Tamp captures per target. Build code has noLog. - NUKE's
.Consumes(Target)can't be kept by name: Tamp'sConsumesis a concurrency resource. - Calling a
[PathExecutable]tool becomesTool.Plan(...). IsServerBuildmaps 1:1.- Components are covered (shipped in 1.17).
New rows: CI-generation attributes,
.Unlisted()→.Internal(),.Description, unmapped DSL calls, unshipped components, and more DotNet settings. Scope is NUKE 8+. ADR 0021 is accepted, with the Phase 2 design. The migration moves to 1.19 on the roadmap. -
Sonar new-code reliability findings cleared (#132): ~45 sync-over-async call sites in
tools/findings-ingest(S6966), the self-build script moved into a named namespace (S3903), and a test without an assertion (S2699).PollingTestsnow runs on a virtualTimeProvider(#142), so its assertions no longer depend on how fast the machine is;Polling.Untiltakes the clock internally.
Fixed
tamp migrateno longer suggests installing the .NET 10 SDK when the migration itself declined to run. The forwarder printed its "dotnet tool executeneeds the .NET 10 SDK; installTamp.Migrateinstead" hint on any non-zero exit, so a refusal on a dirty working tree came back with correct advice followed by irrelevant advice. The hint is now printed only for an exit codeTamp.Migratedoes not produce itself, i.e. only whendotnet tool executenever got the tool running.
Security
- Every OS command Tamp launches is resolved to an absolute path first (#133, Sonar S4036).
git,dotnet, macOSsecurityand Linuxsecret-toolwent through the OS's own lookup, which on Windows searches the working directory beforePATHand on every OS treats a relative or emptyPATHentry as the current directory — so a plantedgit.exein a checkout could be handed a secret. The newExecutableLocatorwalksPATHitself, refuses relative entries and anything inside the current or the launch working directory, and prefers a known location where one exists (/usr/bin/security; the runningdotnethost, thenDOTNET_ROOT, so a repo-local SDK still works).[FromPath]tools keep the lenient walk: a tool the build deliberately puts onPATHunder its own tree is a deliberate choice. - Tamp.Core's regexes run under one shared match timeout (#134, Sonar S6444).
TampRegexholds the single timeout and surfaces a hit as anInvalidDataExceptionnaming what was being parsed — never as "no match", which would silently drop a project from a solution or lose a remote URL. The.git/configremote-URL pattern was also rewritten off a lazy.+?followed by\s*$, which re-tried at every character and went quadratic on a long whitespace run. - CI and Release pin every external action to a commit SHA, and
id-token: writeis scoped to the publish job alone (#135, Sonar S7637/S8233). A moved tag on an action in the publish job would otherwise have handed a third party the OIDC token that mints a nuget.org key. Dependabot now watches the pinned SHAs.
Backfilled: this version was published to nuget.org at the time but no GitHub Release was created (tamp#159). Notes are this version's CHANGELOG.md section, unedited.