Skip to content

Rebuild csc#51345

Merged
RikkiGibson merged 8 commits intodotnet:masterfrom
RikkiGibson:rebuild-csc
Feb 23, 2021
Merged

Rebuild csc#51345
RikkiGibson merged 8 commits intodotnet:masterfrom
RikkiGibson:rebuild-csc

Conversation

@RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Feb 19, 2021

Modifications to the rebuilder which enable us to build csc in the netcoreapp3.1 target. Additional changes related to copying over the win32 resources are needed to enable us to build the net472 target.

@ghost ghost added the Area-Infrastructure label Feb 19, 2021
@RikkiGibson RikkiGibson marked this pull request as ready for review February 20, 2021 18:30
@RikkiGibson RikkiGibson requested review from a team as code owners February 20, 2021 18:30
" --debugPath `"$ArtifactsDir/BuildValidator`"" +
" --sourcePath `"$RepoRoot`"" +
" --referencesPath `"$ArtifactsDir/bin`"" +
" --referencesPath `"$dotnetInstallDir/packs/Microsoft.AspNetCore.App.Ref`"" +
Copy link
Member Author

Choose a reason for hiding this comment

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

Extracting these folders out to command line arguments was necessary to build on Helix agents where dotnet is typically not found under C:\Program Files\dotnet.

var sourceFileInfo = resolvedSource.SourceFileInfo;
var hash = BitConverter.ToString(sourceFileInfo.Hash).Replace("-", "");
_logger.LogInformation($@"""{resolvedSource.DisplayPath}"" - {sourceFileInfo.HashAlgorithm} - {hash}");
var embeddedCompressedHash = sourceFileInfo.EmbeddedCompressedHash is { } compressedHash
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 was needed to verify that compression of embedded sources was producing equivalent results in the rebuild.

writeVisualization(originalPeMdvPath, optionsReader.PeReader.GetMetadataReader());
writeVisualization(originalPdbMdvPath, optionsReader.PdbReader);

var originalPdbXmlPath = Path.Combine(originalPath, assemblyName + ".pdb.xml");
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 didn't end up helping in practice, but using pdb2xml was an attempt to determine if PDB differences were "significant" versus being merely differences of the offsets of various resources in the assembly.

It could help in the future, so I'd like to leave it here unless it introduces a problem.

pool:
vmImage: windows-2019
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.Open
Copy link
Member

Choose a reason for hiding this comment

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

What motivated this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this pool is faster.

RikkiGibson and others added 2 commits February 22, 2021 13:00
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
Run-MSBuild $projectPath "/restore /t:Pack /p:RoslynEnforceCodeStyle=false /p:RunAnalyzersDuringBuild=false /p:DotNetUseShippingVersions=true /p:InitialDefineConstants=BOOTSTRAP /p:PackageOutputPath=`"$dir`" /p:EnableNgenOptimization=false /p:PublishWindowsPdb=false $force32Flag" -logFileName "Bootstrap" -configuration $bootstrapConfiguration -runAnalyzers
$packageFile = Get-ChildItem -Path $dir -Filter "$packageName.*.nupkg"
Unzip (Join-Path $dir $packageFile) $dir
Unzip (Join-Path $dir $packageFile.Name) $dir
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 change makes the script work on both Windows PowerShell and PowerShell Core.

@RikkiGibson RikkiGibson merged commit aabac7a into dotnet:master Feb 23, 2021
@ghost ghost added this to the Next milestone Feb 23, 2021
@RikkiGibson RikkiGibson deleted the rebuild-csc branch February 24, 2021 22:07
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants