v7.1: remove LibGit2Sharp and native binaries
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 28/100
Direzione di ricerca
Inizia verificando le modifiche di managed-backend in #5135 e rivedendo i file selector elencati, le composition root, le utility del workflow e i test del backend selector. Traccia i percorsi di packaging e CI, quindi rimuovi l’implementazione legacy e l’infrastruttura dual-backend, preservando la compatibilità del selector v7, l’esecuzione managed-only, il comportamento di stderr e i test che dimostrano che i package non contengono binari nativi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Remove LibGit2Sharp and all shipped native Git binaries in GitVersion v7.1, after the managed backend ships as the v7.0 default under #5135.
Part of #5031. The release and selector lifecycle is governed by #5135, with final environment-variable cleanup in v8 tracked by #5136.
Remove the legacy backend
- Delete
src/GitVersion.LibGit2Sharpandnew-cli/GitVersion.Core.Libgit2Sharp. - Re-point any remaining source links or consumers to the managed backend.
- Drop LibGit2Sharp and native-binary package references.
- Add packaging assertions proving shipped packages contain no
runtimes/**/native/*entries. - Register the managed backend directly at production composition roots.
Remove dual-backend validation scaffolding
- Collapse the unit-test
git_backendmatrix to managed-only execution. - Collapse Docker and artifact tests to one managed-backend path.
- Remove backend inputs and environment forwarding from reusable workflows/actions and build utilities.
- Delete dual-backend parity tests and libgit2-only test visibility grants.
- Remove corpus tooling whose purpose is comparing managed and libgit2 results.
- Keep managed-only tests that originated from parity work.
Retain the v7 selector compatibility shell
Do not remove recognition of GITVERSION_GIT_BACKEND in this issue:
GITVERSION_GIT_BACKEND=libgit2fails with an actionable message that the backend was removed in v7.1.GITVERSION_GIT_BACKEND=managedremains accepted as a no-op throughout v7.x so explicit v7.0 opt-in automation keeps working.- The selector and its compatibility diagnostics are removed in v8 by #5136.
The implementation no longer performs backend selection after this issue; only the v7 compatibility validation remains.
Documentation
- Update the managed-Git design/status and v6-to-v7 migration documentation to show managed as the v7.0 default and LibGit2Sharp removal in v7.1.
- Document the v7.1 error for
GITVERSION_GIT_BACKEND=libgit2and the v8 removal tracked by #5136.
Acceptance criteria
- Shipped packages contain no LibGit2Sharp assemblies or native Git binaries.
- Production and CI use only the managed backend.
- No dual-backend selection or comparison infrastructure remains, apart from the v7 environment-variable compatibility validator.
- Legacy selection fails clearly and explicit
managedremains harmless in v7.x.
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.
Branch additions relevant to backend removal
-
src/GitVersion.Core/Git/GitBackend.csnow defaults to managed Git and shares trimmed/case-insensitive/blank-default validation throughsrc/GitVersion.Core/FeatureSelector.cs, usingWarningException. In v7.1, replace thelibgit2selection path with actionable removal guidance; keep explicitmanagedaccepted until v8. -
src/GitVersion.App/FeatureSelections.cscaptures the backend beforeCliHost.csregisters it andGitVersionApp.cslogs the captured value. Remove the libgit2 registration/logging branch while retaining truthful managed diagnostics and stderr isolation. - Review
new-cli/GitVersion.Common/GitVersion.Common.csproj: the new shared helper is explicitly source-linked because the Git backend selector is source-linked. Keep that dependency buildable until #5136 removes the selector/helper. - Update
src/GitVersion.Core.Tests/Core/GitBackendSelectorTests.cs: replace libgit2 success cases with removal-error cases, retaining managed/default/empty/padded/case-insensitive and unknown-value validation. - In
src/GitVersion.App.Tests/FeatureSelectorTests.cs, reduceCompositionRegistersSelectedImplementationsto managed-only registration after this cleanup. Coordinate v6 parser/configuration cases with #5188. AdaptSelectionLogUsesCapturedValueswithout losing the captured-state assertion. - In
src/GitVersion.App.Tests/ExecFeatureSelectorTests.cs, retire libgit2 runtime/migration variants inSelectorCombinationsCalculateAndLogWithoutPollutingOutputandMigrationRetainsYamlStdoutWithEitherConfigurationAndBackend; add an actionable libgit2-removal stderr case toInvalidSelectorsFailBeforeHelpWithActionableStderr. Preserve machine-readable output and default-selection tests. - Remove backend matrices from workflows/artifact tests only with the implementation cleanup.
build/common/Utilities/DockerContextExtensions.csnow correctly documents the absent-selector default as managed.
The v7.0 branch has tests for every parser/configuration/backend combination and concrete registered implementation. Remove the obsolete alternatives rather than deleting the whole selector/output-isolation suite. Selector variables and common validation are removed only in #5136 (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.
- Lingua principale
- C#
- Stelle
- 3.1k
- Fork
- 661
- Merge medio
- 7h 4m
- PR unite (30g)
- 77
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GitTools/GitVersion
-
[ISSUE]: Mainline: version on main falls back to 0.0.x when a branch named in a merge message still existsForse già presa @arturcic l’ha presa 39 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
GitTools/GitVersion#5405 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
GitTools/GitVersion#5398 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
GitTools/GitVersion#5267 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
GitTools/GitVersion#5188 ·
I maintainer di solito rispondono entro 1 giorno
-
breaking change pinned
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
GitTools/GitVersion#5137 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GitTools/GitVersion
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area/backend type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
umbraco/Umbraco-CMS#24668 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Pri3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MicrosoftDocs/windows-dev-docs#6205 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno