-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ArPow local-onboarding guidance to include --work-tree option #2445
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This makes things work better in a source-tarball build, where there may be a .git directory somewhere in our parent directories but it's for a different repo than vstest. In a situation like that a plain `git apply` will (silently!) ignore patches because they wont apply to the unrelated repository. That will (eventually) make the source-build fail. `--work-tree` makes git directly use the directory that we care about. See dotnet/source-build#2445 for more details.
This makes things work better in a source-tarball build, where there may be a .git directory somewhere in our parent directories but it's for a different repo than vstest. In a situation like that a plain `git apply` will (silently!) ignore patches because they wont apply to the unrelated repository. That will (eventually) make the source-build fail. `--work-tree` makes git directly use the directory that we care about. See dotnet/source-build#2445 for more details.
I looked through the existing repositories and opened PRs against all repos that needed the
If/when we update to those SHAs in installer, we should get the fixes too. I can do backports to the release branches too, if someone can help me figure out which ones will be used by release/6.0. |
The generated (arpow) source-tarball is often built in a context where it's under a subdirectory of an unrelated git repository. In such a situation, `git apply` will try and apply patches to the main git repository instead of the extracted source-tarball contents. That fails (silently), so the patches never get applied. Building that source-tarball eventually fails because of those missing patches. Use --work-tree to tell git to apply patches to the tarball directory and not to whatever git repo the tarball directory happens to be under. Fixes: dotnet#2445
The generated (arpow) source-tarball is often built in a context where it's under a subdirectory of an unrelated git repository. In such a situation, `git apply` will try and apply patches to the main git repository instead of the extracted source-tarball contents. That fails (silently), so the patches never get applied. Building that source-tarball eventually fails because of those missing patches. Use --work-tree to tell git to apply patches to the tarball directory and not to whatever git repo the tarball directory happens to be under. Fixes: #2445
https://github.com/dotnet/source-build/blob/main/Documentation/planning/arcade-powered-source-build/onboarding/local-onboarding.md#patching misses out on
--work-tree
option. We use that everywhere else. For example:https://github.com/dotnet/installer/blob/74507010fafeb931a063f8649bff0b032ebc725b/src/SourceBuild/tarball/content/repos/Directory.Build.targets#L83
The option was originally added in #937 to allow tarball builds to work when it was extracted to a sub-directory of another (non-related) git repository.
For example, I see this error now manifesting as:
dotnet6.0/dotnet-1afc0b6892dcd718cd88e281f3acd840cb966a4d-x64-bootstrap/.dotnet/sdk/6.0.100-preview.6.21355.2/NuGet.targets(565,5): error : File 'dotnet6.0/dotnet-1afc0b6892dcd718cd88e281f3acd840cb966a4d-x64-bootstrap/src/nuget-client.7363366401b43f4ea250394db8dad3707e9a9636/NuGet.config' does not exist. [dotnet6.0/dotnet-1afc0b6892dcd718cd88e281f3acd840cb966a4d-x64-bootstrap/packages/restored/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/6.0.0-beta.21319.2/tools/Tools.proj]
Which looks impossible on first sight because https://github.com/NuGet/NuGet.Client/blob/7363366401b43f4ea250394db8dad3707e9a9636/eng/source-build-patches/0001-Rename-NuGet.Config-to-NuGet.config-to-account-for-a.patch was supposed to have renamed the file.
The text was updated successfully, but these errors were encountered: