Summary
Remove the v7 compatibility selector environment variables in GitVersion v8 after their legacy implementations have been removed in v7.1.
This is the final cleanup following the v7 feature-selector alignment issue.
Progress
Remove
GITVERSION_ARGUMENT_PARSER_VERSION
GITVERSION_CONFIGURATION_VERSION
GITVERSION_GIT_BACKEND
- Selector types, parsing, validation, logging branches, compatibility diagnostics, and tests that exist only for these variables.
GitVersion v8 has one implementation for each concern:
- POSIX argument parser
- Nested
calculation/output configuration
- Managed Git backend
Register and use those implementations directly rather than passing through feature-selector abstractions.
Behavior
- The three retired variables no longer influence execution.
- Prefer failing fast with a clear removal message when a retired variable is set, rather than silently accepting stale deployment configuration.
- Remove the per-selector informational log lines where they no longer communicate a choice. Retain ordinary diagnostic information where useful, such as identifying the managed Git implementation.
- Keep
gitversion config migrate available for converting old configuration files; migration support does not imply runtime support for the v6 configuration format.
Acceptance criteria
- No production selection code reads the three variables.
- No compatibility selector abstractions or no-op selection branches remain.
- Packaging contains no LibGit2Sharp/native backend artifacts.
- Legacy argument parsing and legacy configuration loading remain unavailable.
- Tests verify actionable diagnostics when retired variables are supplied.
- v8 breaking-change and migration documentation lists the removed variables and fixed implementations.
Cleanup inventory from the v7.0 selector branch
The following inventory comes from arturcic:feature/v7-feature-selectors at 54adbb24e, the implementation of #5135. Implementation PR: #5189, opened from the fork after all four fork workflows passed on that commit. The inventory describes the PR branch; completion of #5135 remains a prerequisite until the PR is merged.
Production inventory for v8 selector removal
Tests to adapt rather than indiscriminately delete
Sweep the branch's updated BREAKING_CHANGES.md, migration guide, CLI arguments, environment-variable reference and managed-Git design document. Describe retired variables as removals; remove temporary-fallback setup instructions from current v8 guidance while preserving historical v7 documentation where appropriate.
Output-isolation regression added during #5189 review
Summary
Remove the v7 compatibility selector environment variables in GitVersion v8 after their legacy implementations have been removed in v7.1.
This is the final cleanup following the v7 feature-selector alignment issue.
Progress
gitversion config migrate.Remove
GITVERSION_ARGUMENT_PARSER_VERSIONGITVERSION_CONFIGURATION_VERSIONGITVERSION_GIT_BACKENDGitVersion v8 has one implementation for each concern:
calculation/outputconfigurationRegister and use those implementations directly rather than passing through feature-selector abstractions.
Behavior
gitversion config migrateavailable for converting old configuration files; migration support does not imply runtime support for the v6 configuration format.Acceptance criteria
Cleanup inventory from the v7.0 selector branch
The following inventory comes from arturcic:feature/v7-feature-selectors at 54adbb24e, the implementation of #5135. Implementation PR: #5189, opened from the fork after all four fork workflows passed on that commit. The inventory describes the PR branch; completion of #5135 remains a prerequisite until the PR is merged.
Production inventory for v8 selector removal
src/GitVersion.App/ArgumentParserVersion.cs,src/GitVersion.Core/Configuration/ConfigurationVersion.csandsrc/GitVersion.Core/Git/GitBackend.csafter v7.1: remove legacy argument parser and v6 configuration runtime #5188/v7.1: remove LibGit2Sharp and native binaries #5040 have removed the legacy implementations.src/GitVersion.Core/FeatureSelector.csonce it has no consumers, and remove its explicit source link fromnew-cli/GitVersion.Common/GitVersion.Common.csprojtogether with obsolete source-linked selectors. Build both solution trees to catch dangling links.src/GitVersion.App/FeatureSelections.csand its registration/logging throughCliHost.csandGitVersionApp.cs; register fixed implementations directly. Retain ordinary implementation diagnostics where useful.GitVersionCacheKeyFactoryand any remaining configuration serializer/provider/override consumers ofConfigurationVersionSelector. Preserve configuration-version/cache compatibility where still necessary independently of environment-variable selection.GITVERSION_USE_V6_ARGUMENT_PARSERboolean in the retirement policy instead of leaving a dangling replacement message pointing at a selector that v8 has itself removed.Program.csclean stderr startup errors, migration's root-level--log-filesupport andServiceCollectionExtensionsmachine-readable-output isolation. These behaviors must survive removal of selector-specific logging.Tests to adapt rather than indiscriminately delete
GitBackendSelectorTests,ConfigurationVersionSelectorTestsandFeatureSelectorTests. Replace their selector-routing assertions with fixed-implementation composition tests.SelectionLogUsesCapturedValueswhen the selection snapshot is removed; retain any ordinary logging behavior under a suitable test.ExecFeatureSelectorTests: remove selector permutation setup fromSelectorCombinationsCalculateAndLogWithoutPollutingOutputandMigrationRetainsYamlStdoutWithEitherConfigurationAndBackend, while retaining JSON, single-variable, show-config and flat-input migration output-isolation regressions.InvalidSelectorsFailBeforeHelpWithActionableStderrfor the v8 retired-variable policy. Cover all three retired variables, explicit formerly valid values, unknown values and empty values; diagnostics must name the retired variable and explain that only the v7 parser/nested configuration/managed Git remain, without offering v6/libgit2 or removed selectors as a workaround.DefaultsSelectV7AndManagedWithConsoleLogsOnStderrto assert fixed runtime behavior and any retained logging, without expecting informational choice messages that no longer represent a choice.Sweep the branch's updated
BREAKING_CHANGES.md, migration guide, CLI arguments, environment-variable reference and managed-Git design document. Describe retired variables as removals; remove temporary-fallback setup instructions from current v8 guidance while preserving historical v7 documentation where appropriate.Output-isolation regression added during #5189 review
buildServerdimension inExecFeatureSelectorTests.SelectorCombinationsCalculateAndLogWithoutPollutingOutput: JSON, single-variable and show-config stdout must stay free of diagnostics even when build-server output is also selected. This dimension is independent of the parser/configuration/backend selectors being retired.ServiceCollectionExtensions.ConfigureLogger. Build-server integration commands keep their existing output channel; diagnostic logs must not move back to stdout during cleanup.ArgumentParserand, until legacy removal,legacy_help.md) and the CLI/migration documentation consistent with stderr logging.