-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
Hi,
We just hit an issue over in pythonnet/pythonnet#1613 where a git repository is checked out as part of a build step, but due to interactions between build systems, the repositoryformatversion is set to 1, which then hits the following code in
sourcelink/src/Microsoft.Build.Tasks.Git/GitDataReader/GitRepository.cs
Lines 120 to 125 in 48e002e
| // See https://github.com/git/git/blob/master/Documentation/technical/repository-version.txt | |
| string? versionStr = config.GetVariableValue("core", "repositoryformatversion"); | |
| if (GitConfig.TryParseInt64Value(versionStr, out var version) && version > SupportedGitRepoFormatVersion) | |
| { | |
| throw new NotSupportedException(string.Format(Resources.UnsupportedRepositoryVersion, versionStr, SupportedGitRepoFormatVersion)); | |
| } |
Which then causes the Python wheel build to fail:
C:\Users\WDAGUtilityAccount\.nuget\packages\microsoft.build.tasks.git\1.0.0\build\Microsoft.Build.Tasks.Git.targets(24,5): error : Error reading git repository information: Unsupported repository version 1. Only versions up to 0 are supported. [C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime\Python.Runtime.csproj]
C:\Users\WDAGUtilityAccount\.nuget\packages\microsoft.build.tasks.git\1.0.0\build\Microsoft.Build.Tasks.Git.targets(24,5): warning : Unable to locate repository with working directory that contains directory 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime'. [C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime\Python.Runtime.csproj]
Build FAILED.
C:\Users\WDAGUtilityAccount\.nuget\packages\microsoft.build.tasks.git\1.0.0\build\Microsoft.Build.Tasks.Git.targets(24,5): warning : Unable to locate repository with working directory that contains directory 'C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime'. [C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime\Python.Runtime.csproj]
C:\Users\WDAGUtilityAccount\.nuget\packages\microsoft.build.tasks.git\1.0.0\build\Microsoft.Build.Tasks.Git.targets(24,5): error : Error reading git repository information: Unsupported repository version 1. Only versions up to 0 are supported. [C:\Users\WDAGUtilityAccount\AppData\Local\Temp\pip-req-build-4vyeo0ym\src\runtime\Python.Runtime.csproj]
1 Warning(s)
1 Error(s)
Would it be possible to allow overriding this check via a property or environment variable?
I'm not sure what the impact of removing this check completely would be.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels