Remove feature-selector environment variables
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- csharp, git
- Lĩnh vực
- cli, documentation, testing-qa, tooling
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các issue tiên quyết và danh mục selector, sau đó kiểm tra src/GitVersion.App/ArgumentParserVersion.cs, src/GitVersion.Core/Configuration/ConfigurationVersion.cs, src/GitVersion.Core/Git/GitBackend.cs, FeatureSelections.cs và các bài kiểm thử selector được tham chiếu. Chạy các cây solution bị ảnh hưởng và ExecFeatureSelectorTests; công việc được hoàn tất khi các triển khai đã sửa được đăng ký, các biến đã ngừng sử dụng tạo ra các lỗi có thể xử lý, migration và output isolation vẫn hoạt động, đồng thời tài liệu v8 được cập nhật.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Complete prerequisite #5135 — v7.0 selector alignment.
- Complete prerequisite #5188 — v7.1 legacy parser/configuration runtime removal.
- Complete prerequisite #5040 — remove LibGit2Sharp and native binaries.
- Remove all three compatibility selectors and their selection abstractions in v8.
- Register the fixed implementations directly and retain
gitversion config migrate. - Add actionable diagnostics and tests for retired environment variables.
- Update v8 breaking-change and migration documentation.
Remove
GITVERSION_ARGUMENT_PARSER_VERSIONGITVERSION_CONFIGURATION_VERSIONGITVERSION_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/outputconfiguration - 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 migrateavailable 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
- Remove selection-only code in
src/GitVersion.App/ArgumentParserVersion.cs,src/GitVersion.Core/Configuration/ConfigurationVersion.csandsrc/GitVersion.Core/Git/GitBackend.csafter #5188/#5040 have removed the legacy implementations. - Remove
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. - Remove or simplify
src/GitVersion.App/FeatureSelections.csand its registration/logging throughCliHost.csandGitVersionApp.cs; register fixed implementations directly. Retain ordinary implementation diagnostics where useful. - Update
GitVersionCacheKeyFactoryand any remaining configuration serializer/provider/override consumers ofConfigurationVersionSelector. Preserve configuration-version/cache compatibility where still necessary independently of environment-variable selection. - Keep the minimal retired-variable detection needed for actionable errors, separately from runtime selection. Include the old
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. - Keep
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
- Retire success/normalization tests that exist only for the removed variables in
GitBackendSelectorTests,ConfigurationVersionSelectorTestsandFeatureSelectorTests. Replace their selector-routing assertions with fixed-implementation composition tests. - Remove
SelectionLogUsesCapturedValueswhen the selection snapshot is removed; retain any ordinary logging behavior under a suitable test. - Adapt
ExecFeatureSelectorTests: remove selector permutation setup fromSelectorCombinationsCalculateAndLogWithoutPollutingOutputandMigrationRetainsYamlStdoutWithEitherConfigurationAndBackend, while retaining JSON, single-variable, show-config and flat-input migration output-isolation regressions. - Rewrite
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. - Adapt
DefaultsSelectV7AndManagedWithConsoleLogsOnStderrto assert fixed runtime behavior and any retained logging, without expecting informational choice messages that no longer represent a choice. - Keep migration from flat v6 input supported and tested even though neither v6 runtime loading nor selector variables remain.
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
- Preserve the
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. - Retain consistent stderr routing for console logs in
ServiceCollectionExtensions.ConfigureLogger. Build-server integration commands keep their existing output channel; diagnostic logs must not move back to stdout during cleanup. - Keep CLI help (
ArgumentParserand, until legacy removal,legacy_help.md) and the CLI/migration documentation consistent with stderr logging.
- Ngôn ngữ chính
- C#
- Star
- 3.1k
- Fork
- 661
- Merge trung bình
- 7 giờ 4 phút
- Pull request đã merge (30 ngày)
- 77
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GitTools/GitVersion
-
[ISSUE]: Mainline: version on main falls back to 0.0.x when a branch named in a merge message still existsCó thể đã có người làm @arturcic đã nhận 39 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
GitTools/GitVersion#5405 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
GitTools/GitVersion#5398 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
GitTools/GitVersion#5267 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
GitTools/GitVersion#5188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
breaking change pinned
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
GitTools/GitVersion#5137 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của GitTools/GitVersion
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area/backend type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
umbraco/Umbraco-CMS#24668 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pri3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MicrosoftDocs/windows-dev-docs#6205 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày