v7.1: remove legacy argument parser and v6 configuration runtime
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
- 30/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp, git
- Lĩnh vực
- cli, documentation, testing
Hướng nghiên cứu
Trước tiên, hãy xác minh điều kiện tiên quyết #5135, sau đó đọc các triển khai selector trong src/GitVersion.App/ArgumentParserVersion.cs, src/GitVersion.Core/Configuration/ConfigurationVersion.cs và các tệp đăng ký được liệt kê trong issue. Chạy các bài kiểm thử feature-selector, thực thi, dòng lệnh và cấu hình đã nêu trước khi thay đổi chúng. Hoàn tất khi các lựa chọn runtime v6 thất bại kèm hướng dẫn di chuyển, v7 vẫn được hỗ trợ, việc di chuyển đầu vào v6 vẫn hoạt động và thông tin chẩn đoán không xuất hiện trong stdout có thể đọc bằng máy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Split from #5135: remove the legacy argument parser and flat v6 configuration runtime in v7.1, after the v7.0 defaults and temporary fallbacks ship. The completed configuration foundation is #5131 (#5158, #5159, #5160).
Scope
- Complete prerequisite #5135 (v7.0 selector alignment).
- Remove LegacyArgumentParser and runtime loading/serialization of flat v6 configuration.
- Keep
gitversion config migrate, including conversion of v6 input, available. - Retain
GITVERSION_ARGUMENT_PARSER_VERSIONandGITVERSION_CONFIGURATION_VERSIONduring v7.x; rejectv6with actionable removal/migration guidance and accept explicitv7as a no-op. - Preserve consistent selector validation and effective-selection logging without contaminating machine-readable stdout.
- Remove obsolete runtime tests and update migration/breaking-change documentation; test retired-value diagnostics and retained migration support.
Boundaries and dependencies
#5135 owns v7.0 defaults and temporary fallbacks. #5040 separately removes LibGit2Sharp/native binaries in v7.1. #5136 removes all three selectors in v8 and depends on both v7.1 cleanup issues. Do not remove selectors here.
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 code to adapt in v7.1
-
src/GitVersion.App/ArgumentParserVersion.cs: remove the legacy parser implementation path; retain the environment-variable compatibility validator sov6reports removal guidance andv7remains accepted. Preserve the actionable diagnostic for the already-retiredGITVERSION_USE_V6_ARGUMENT_PARSERboolean. -
src/GitVersion.Core/Configuration/ConfigurationVersion.cs: retirev6runtime selection with guidance togitversion config migrate, while keepingv7accepted. Remove runtime flat-format loading/serialization without deleting the migration service's ability to read flat v6 input. - Adapt
src/GitVersion.App/FeatureSelections.cs,CliHost.csandGitVersionAppModule.csto register only the v7 parser/configuration. Retain effective-selection snapshots/logging during v7.x and the managed/libgit2 backend boundary owned by #5040. - Keep shared normalization/error handling in
src/GitVersion.Core/FeatureSelector.csuntil all selector removal occurs under #5136. Preserve its source link innew-cli/GitVersion.Common/GitVersion.Common.csprojwhile the source-linked backend selector still uses it. - Preserve
Program.csstartup error handling: exit code 1,An error occurred:prefix and actionable stderr text, with no stack trace or machine-readable stdout pollution. - Preserve
ArgumentParser.MapMigrationValueshandling of a root-level--log-fileand the stderr routing inServiceCollectionExtensions.ConfigureLogger. These are retained logging/migration behavior, not disposable v6 scaffolding.
Tests to remove, rewrite or retain
-
src/GitVersion.App.Tests/FeatureSelectorTests.cs: replace v6 success cases inParserResolvesKnownValuesandCompositionRegistersSelectedImplementationswith retirement diagnostics; retain normalization/unknown-value tests,RetiredBooleanIsRejectedEvenWithNewSelectorand captured-value behavior inSelectionLogUsesCapturedValuesusing supported selections. -
src/GitVersion.App.Tests/ExecFeatureSelectorTests.cs: reduce the eight runtime combinations inSelectorCombinationsCalculateAndLogWithoutPollutingOutputto supported implementations; add explicit parser-v6 and configuration-v6 failure cases with migration guidance. Retain JSON, show-variable, show-config and stderr-isolation assertions, includingDefaultsSelectV7AndManagedWithConsoleLogsOnStderrandInvalidSelectorsFailBeforeHelpWithActionableStderr. - Adapt
MigrationRetainsYamlStdoutWithEitherConfigurationAndBackend: v6 input files must still migrate with the supported v7 runtime selection. A removed v6 selector value must not be mistaken for retained flat-file migration support. Coordinate libgit2 cases with #5040. -
src/GitVersion.App.Tests/ExecCmdLineArgumentTest.csnow selects the fallback throughGITVERSION_ARGUMENT_PARSER_VERSION=v6; remove its legacy-parser variants while keeping modern commit-selection and verbosity regressions. - Rewrite v6 success cases in
src/GitVersion.Core.Tests/Core/ConfigurationVersionSelectorTests.csand related configuration integration tests as actionable retirement failures. Do not delete normalization, default-selection or migration coverage wholesale.
Update BREAKING_CHANGES.md, docs/input/docs/migration/v6-to-v7.md, docs/input/docs/usage/cli/arguments.md, docs/input/docs/reference/environment-variables.md and docs/design/managed-git-migration.md from temporary-fallback guidance to v7.1 removal guidance. Actual selector-variable removal stays in #5136 for v8.
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
-
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
-
breaking change configuration
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
GitTools/GitVersion#5136 ·
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