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

Add arcade-powered source-build basic configuration and patches #651

Merged
merged 1 commit into from Oct 6, 2020

Conversation

dagood
Copy link
Member

@dagood dagood commented Sep 24, 2020

This PR adds arcade-powered source-build configuration, so ./build.sh -c Release /p:ArcadeBuildFromSource=true creates a source-build intermediate nuget package. It also adds patches that we have been maintaining in dotnet/source-build.

Comment on lines 210 to 215
internal string? ReadSubmoduleHeadCommitSha(string submoduleWorkingDirectoryFullPath)
{
if (Directory.Exists(Path.Combine(submoduleWorkingDirectoryFullPath, ".git")))
{
return File.ReadAllText(Path.Combine(submoduleWorkingDirectoryFullPath, ".git", "HEAD"));
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crummel can you give some context on this patch? My understanding has been that a submodule by definition has a .git file that points to the superproject's Git data for that submodule. Maybe something's being treated as a submodule that shouldn't be?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch seems to be breaking tests around this scenario, which makes sense:

[submodule ""S6""] # sub6/.git is a directory, but should be a file
path = sub6
url = http://github.com

I'm going to revert it for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here was to use the Minimal git repository metadata support. Source-build doesn't have real repos (we purposely use non-git source directories to reduce confusion and tarball size), so we write out .git/HEAD to these folders to make sourcelink work. This didn't work in submodules because sourcelink always treats submodules as having .gitdir redirects instead of real .git folders (which in a normal situation is true). I'll take a look and try to figure out a clean fix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #653 for a better version of this patch.

@dagood
Copy link
Member Author

dagood commented Sep 24, 2020

Looking at a few of the test failures, it looks like we're hitting the same problems as this plain old Arcade update PR: #650.

@tmat can you take a look at #650 to get sourcelink closer to what we need for source-build? Then we can get a cleaner read on PR validation in this PR.

@@ -312,9 +312,15 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
return $global:_MSBuildExe
}

$vsMinVersionReqdStr = '16.5'
# Minimum VS version to require.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum VS version to require. [](start = 2, length = 32)

Shouldn't this be auto-updated by Maestro?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like #650 is blocked currently. I'd prefer we resolve that issue and let Maestro update these files.


In reply to: 494513458 [](ancestors = 494513458)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was auto-updated by Darc in this case, in my first commit. And yeah, I pointed at #650 in my comment on this PR. 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased on top of the merge, now this PR just has the one commit adding basic arcade-powered-source build configuration.

@@ -63,7 +63,7 @@
</Microsoft.SourceLink.AzureDevOpsServer.Git.TranslateRepositoryUrls>

<ItemGroup>
<SourceRoot Remove="@(SourceRoot)"/>
<SourceRoot Remove="@(SourceRoot)" Condition="'@(_TranslatedSourceRoot)' != ''"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" Condition="'@(_TranslatedSourceRoot)' != ''"/> [](start = 39, length = 48)

This is a product change. Is there an issue filed that this is fixing? We should also have a test covering this if this is indeed a product bug.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crummel do you have any extra info on this patch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember that TranslateRepositoryUrls was returning an empty list for TranslatedSourceRoots. Then with the removal of the original SourceRoots, we ended up with no SourceRoots at all, which caused the usual "no SourceRoots" error. I'll take a look at why this was happening.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My test build looks good without this, so I think it was a temporary issue.

Copy link
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@dagood
Copy link
Member Author

dagood commented Sep 29, 2020

@tmat can you take another look?

I removed the patches, so this is now only the minimal infra. We can investigate further on the need for the patches and integrate changes as needed later after discussion.

Copy link
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@tmat tmat merged commit 217b2fe into dotnet:master Oct 6, 2020
@dagood dagood deleted the apsb branch October 6, 2020 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants