-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Rebuild csc #51345
Rebuild csc #51345
Conversation
" --debugPath `"$ArtifactsDir/BuildValidator`"" + | ||
" --sourcePath `"$RepoRoot`"" + | ||
" --referencesPath `"$ArtifactsDir/bin`"" + | ||
" --referencesPath `"$dotnetInstallDir/packs/Microsoft.AspNetCore.App.Ref`"" + |
There was a problem hiding this comment.
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
.
@@ -88,7 +88,10 @@ void logResolvedSources() | |||
{ | |||
var sourceFileInfo = resolvedSource.SourceFileInfo; | |||
var hash = BitConverter.ToString(sourceFileInfo.Hash).Replace("-", ""); | |||
_logger.LogInformation($@"""{resolvedSource.DisplayPath}"" - {sourceFileInfo.HashAlgorithm} - {hash}"); | |||
var embeddedCompressedHash = sourceFileInfo.EmbeddedCompressedHash is { } compressedHash |
There was a problem hiding this comment.
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.
@@ -141,6 +146,26 @@ private CompilationDiff(ImmutableArray<Diagnostic> diagnostics, string originalP | |||
writeVisualization(originalPeMdvPath, optionsReader.PeReader.GetMetadataReader()); | |||
writeVisualization(originalPdbMdvPath, optionsReader.PdbReader); | |||
|
|||
var originalPdbXmlPath = Path.Combine(originalPath, assemblyName + ".pdb.xml"); |
There was a problem hiding this comment.
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.
@@ -215,7 +215,8 @@ jobs: | |||
|
|||
- job: Correctness_Rebuild | |||
pool: | |||
vmImage: windows-2019 | |||
name: NetCorePublic-Pool | |||
queue: BuildPool.Windows.10.Amd64.Open |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What motivated this change?
There was a problem hiding this comment.
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.
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
@@ -333,7 +333,7 @@ function Make-BootstrapBuild([switch]$force32 = $false) { | |||
|
|||
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 |
There was a problem hiding this comment.
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.
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.