Skip to content

Align v7 feature selectors and legacy lifecycle #5135

Description

@arturcic

Summary

Align the v7 feature selectors with the implementations that shipped, log each
resolved selection, and remove the legacy implementations on their approved
lifecycle. The v7.0 defaults are the v7 argument parser, v7 configuration, and
managed Git backend; temporary selectors provide the supported fallback paths.

The parser/configuration portions are blocked by #5134. The managed Git default
is independent and is a v7.0 release requirement under #5031.

Environment variables

Concern Environment variable Values v7.0 default
Argument parser GITVERSION_ARGUMENT_PARSER_VERSION v6, v7 v7
Configuration structure GITVERSION_CONFIGURATION_VERSION v6, v7 v7
Git backend GITVERSION_GIT_BACKEND libgit2, managed managed

Replace:

GITVERSION_USE_V6_ARGUMENT_PARSER=true

with:

GITVERSION_ARGUMENT_PARSER_VERSION=v6

The old boolean variable is removed rather than supported as an alias. If it is
still set, GitVersion fails with a clear message identifying
GITVERSION_ARGUMENT_PARSER_VERSION=v6 as its replacement.

v7 behavior

When the variables are unset in v7.0:

  • Use the POSIX v7 argument parser.
  • Use the nested v7 calculation/output configuration.
  • Use the managed Git backend.

Temporary compatibility selections:

GITVERSION_ARGUMENT_PARSER_VERSION=v6
GITVERSION_CONFIGURATION_VERSION=v6
GITVERSION_GIT_BACKEND=libgit2

Explicit GITVERSION_GIT_BACKEND=managed remains accepted throughout v7.x so
automation that selected the managed backend before it became the default does
not break.

Selector behavior:

  • Values are trimmed and case-insensitive.
  • Empty values behave as unset.
  • Unknown values fail fast and list the accepted values.
  • Selection is centralized so all applicable composition roots behave
    consistently.
  • The selectors are independent.

Legacy lifecycle

  • Remove the legacy argument parser and flat v6 configuration runtime support
    on the approved v7.x lifecycle while retaining gitversion config migrate.
  • Keep retired parser/configuration selector values recognizable long enough to
    emit actionable diagnostics.
  • In v7.0, keep LibGit2Sharp available only through the temporary
    GITVERSION_GIT_BACKEND=libgit2 fallback.
  • In v7.1, v7.1: remove LibGit2Sharp and native binaries #5040 removes LibGit2Sharp and native binaries;
    GITVERSION_GIT_BACKEND=libgit2 then fails with an actionable removal
    message, while explicit managed remains accepted as a no-op throughout
    v7.x.
  • Do not remove LibGit2Sharp in this issue. Its removal remains governed by
    v7.1: remove LibGit2Sharp and native binaries #5040.
  • Remove feature-selector environment variables #5136 removes the compatibility selectors in v8 after their prerequisites
    are complete.

Selection logging

Log all resolved selections at information level, using the actual effective
values, for example:

Argument parser version: v7
Configuration version: v7
Git backend: managed
  • Log the effective selection whether it came from the default or an
    environment variable.
  • Do not include these messages in machine-readable JSON, YAML, or
    single-variable stdout.
  • Make configuration-version logging available to non-CLI entry points such as
    MSBuild where normal logging exists.
  • Do not log credentials or unrelated environment values.

Documentation sweep

Align the selector names, v7.0 defaults, fallback behavior, and removal
lifecycle in:

  • BREAKING_CHANGES.md
  • docs/design/managed-git-migration.md
  • docs/input/docs/migration/v6-to-v7.md (migration warning and environment
    variable table)
  • docs/input/docs/usage/cli/arguments.md (selector introduction and
    config migrate availability)

Acceptance criteria

  • Tests cover unset, empty, case-insensitive, whitespace-padded, valid, and
    invalid values.
  • v7.0 defaults select the v7 parser, v7 configuration, and managed Git
    backend.
  • GITVERSION_GIT_BACKEND=libgit2 selects the temporary v7.0 fallback.
  • Explicit GITVERSION_GIT_BACKEND=managed remains accepted throughout v7.x.
  • Explicit parser/configuration fallbacks remain functional until their
    approved removal point.
  • GITVERSION_USE_V6_ARGUMENT_PARSER is rejected with its replacement.
  • All resolved selections are logged without contaminating machine-readable
    stdout.
  • Parser/configuration legacy removal produces actionable diagnostics and does
    not remove gitversion config migrate.
  • Git backend behavior and documentation consistently describe the managed
    v7.0 default, temporary libgit2 fallback, v7.1 LibGit2Sharp removal, and v8
    selector cleanup.
  • Documentation and migration guidance use the aligned selector names.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions