Wire existing bv options to buildvana.json (Config Phase 2)#290
Conversation
Make the *Settings injectables config-aware so each option resolves flag -> buildvana.json -> default: - Add DotNetSettings/DotNetInvocationSettings, resolving dotnet.configuration and the per-command (all/restore/build/test/pack/nugetPush) args and env. DotNetService merges dotnet.all with the per-command settings, appending forwarded command-line arguments last; BuildPipeline takes its default configuration from DotNetSettings instead of a hardcoded "Release". - Make ReleaseSettings config-aware: configuration chain (--configuration -> release.configuration -> dotnet.configuration), release.checkPublicApi, release.dogfood, release.changelogUpdates + release.emptyChangelog (config-only, replacing the removed --unstable-changelog/--require-changelog flags), and release.generateDocsFrom. - ChangelogService.PrepareForRelease substitutes release.emptyChangelog text for an empty "Unreleased changes" section; an empty section with no substitute fails the release. - Replace mainBranch with release.generateDocsFrom: remove GitService.MainBranch and FindMainBranch, the --main-branch global flag and its pre-parsing; gate documentation generation by matching the current branch against the configured regular expressions, and point the changelog permalink at the current branch. Closes Tenacom#269 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 4m 27s —— View job PR Review
Overall the PR is clean and well-structured. The three-tier resolution chain (flag → config → default) is applied consistently, and the removal of
|
An invalid configuration file will prevent execution of _any_ `bv` subcommand, even those that do not depend on configuration. This has been flagged as a behavioral change during review. It is a deliberate decision and stays, but a clarification was due.
Replace the InvocationKind enum (Normal/Informational/Internal) with direct, mechanical parameters on RunDotNetAsync, so each call site spells out exactly how it controls the invocation: - args + tiers (IReadOnlyList<DotNetInvocationSettings>, folded left to right) + commandLineArgs + trailingArgs, applied in that order. trailingArgs win over everything, so ContinuousIntegrationBuild moves there and stays unoverridable by forwarded/configured arguments. - appendVerbosity and an OutputStreaming struct (Disabled / Unconditional / AtVerbosity) replace the streamOutput/streamVerbosity pair, making the illegal "disabled but with a verbosity" state unrepresentable. - The internal MSBuild probe passes empty tiers instead of relying on a null sentinel; BuildEnvironment folds into RunDotNetAsync. Remove the now-stale partial on DotNetService where only the enum needed it, then re-add it for the OutputStreaming nested struct. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull the tier-folding loop out of the private RunDotNetAsync into an internal static MergeInvocation method, and add unit tests covering the arg ordering and environment layering (tier override, null-value removal, and the no-tiers/no-env cases). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the review @claude!
This is a deliberate decision, now enforced even more strictly. The
Fixed.
This is a deliberate decision and will need documenting as soon as we have actual documentation. For now, we'll count on "all" being pretty self-explanatory.
Fixed. Now
Following a refactor that happened in this PR, the elements you mentioned are gone. Tests have been added respecting the spirit of your request though: argument ordering and environment layering are properly covered. Other, unrelated changes have also been added. Please review again. |
|
Claude finished @rdeago's task in 2m 36s —— View job PR Review (Round 2)
All previous concerns have been addressed correctly. Here's what I found on each point, plus a look at the new additions: Previous review — resolution status
Test coverage for arg/env merging ✓
New changes
Nothing significant to flagThe code is correct and consistent throughout. LGTM — ready to merge. |
Closes #269. Config Phase 2 (sub-issue of #267): makes the
*Settingsinjectables config-aware so each option resolves flag →buildvana.json→ default, and replacesmainBranchwithrelease.generateDocsFrom. The config model/loader/schema from Phase 1 (#268) are unchanged — this PR only consumes them.What changed
DotNetSettings/DotNetInvocationSettings(new): resolvedotnet.configurationplus the per-command sub-objects (all,restore,build,test,pack,nugetPush), each carryingargs+env.DotNetService: injectsDotNetSettings; each invocation passes its own sub-object toRunDotNetAsync, which mergesdotnet.allthen the per-command settings. Argument order isbase → dotnet.all → per-command → forwarded command-line args(so a--argument still wins); environment variables applydotnet.allthen per-command. bv-internal probes pass no sub-object, so they receive no user-configured args/env.BuildPipeline: takes its default build configuration fromDotNetSettings.Configurationinstead of a hardcoded"Release".ReleaseSettings: config-aware resolution — configuration chain (--configuration→release.configuration→dotnet.configuration),release.checkPublicApi,release.dogfood,release.changelogUpdates+release.emptyChangelog, andrelease.generateDocsFrom.ChangelogService.PrepareForRelease: substitutesrelease.emptyChangelogtext into an empty "Unreleased changes" section; an empty section with no configured substitute fails the release (inReleaseCommand, which owns the policy).mainBranchremoved end-to-end: deletedGitService.MainBranch/FindMainBranch, the--main-branchglobal flag and its pre-parsing. Documentation generation is now gated by matching the current short branch name against therelease.generateDocsFromregexes (default["^main$", "^master$"]); the changelog permalink in generated release notes now points at the current branch.Breaking changes
--main-branchremoved (docs gating now viarelease.generateDocsFrom).--unstable-changelog/--require-changelogremoved with no CLI replacement (changelog policy is repo-stable:release.changelogUpdates+release.emptyChangelog).CHANGELOG updated accordingly (amended the in-cycle, still-unreleased entries that referenced the now-removed flags rather than appending contradictory bullets).
Testing
dotnet build Buildvana.slnx— clean (0 warnings).Buildvana.Tool.Tests— 52/52 pass (added coverage for the configuration chain,releaseconfig layering, andgenerateDocsFrommatching).inspectcode --severity=WARNING— 0 results.🤖 Generated with Claude Code