Skip to content
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

Repo source-build should copy sources instead of git clone #4117

Closed
ViktorHofer opened this issue Feb 13, 2024 · 5 comments
Closed

Repo source-build should copy sources instead of git clone #4117

ViktorHofer opened this issue Feb 13, 2024 · 5 comments
Assignees
Labels
area-arcade Common Arcade source-build infra

Comments

@ViktorHofer
Copy link
Member

https://github.com/dotnet/arcade/blob/b372abae012cab2dbf011bd39c395e940e35da86/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets#L98

CopySrcInsteadOfClone should probably default to true?

cc @NikolaMilosavljevic

@dotnet-issue-labeler dotnet-issue-labeler bot added area-additional-repos Adding additional contributing repos untriaged labels Feb 13, 2024
@MichaelSimons
Copy link
Member

Why is copy preferred over clone?

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Feb 22, 2024

When I talked with @NikolaMilosavljevic offline he mentioned that copying should be preferred over git clone. @NikolaMilosavljevic can you please provide some arguments on that?

For me the obvious ones are avoiding the unnecessary networking calls and the extra work to resolve the git deltas. We already checked the repository out from git so why do it again when the sources are already on disk?

@NikolaMilosavljevic
Copy link
Member

I don't have any "hard" data myself. I've heard few times that copy would solve some issues, but I don't have a preference here.

@MichaelSimons
Copy link
Member

@ViktorHofer points out in dotnet/runtime#98476 how some sourcelink changes require copy instead of clone. This raises a question to me if the clone option should be retained or if we should only support the copy option?

@MichaelSimons
Copy link
Member

Per in-person discussion we would like to validate to ensure there are no scenarios that require the clone - e.g. repos with submodules. If no repos require clone, we feel it is best to remove it and only have the copy path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-arcade Common Arcade source-build infra
Projects
Archived in project
Development

No branches or pull requests

3 participants