Skip to content

Commit 88cec48

Browse files
authored
Merge pull request #13777 from dotnet/merges/main-to-release/dev17.4
Merge main to release/dev17.4
2 parents 3d99a9a + fc78730 commit 88cec48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+644
-129
lines changed

FSharpBuild.Directory.Build.props

+10
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@
8484
<DefineConstants>$(DefineConstants);TESTING_ON_LINUX</DefineConstants>
8585
</PropertyGroup>
8686

87+
88+
<!-- CompressAllMetadata is a switch set by the CI to do a test pass where we compress the metadata for the assemblies -->
89+
<!-- We don't compress the proto-compiler yet, because no shipped compiler, and the arcade compiler don't yet support compression -->
90+
<PropertyGroup Condition="'$(Configuration)' == 'Proto' or '$(CompressAllMetadata)' != 'true'">
91+
<CompressMetadata>false</CompressMetadata>
92+
</PropertyGroup>
93+
<PropertyGroup Condition="'$(Configuration)' != 'Proto' and '$(CompressAllMetadata)' == 'true'">
94+
<CompressMetadata>true</CompressMetadata>
95+
</PropertyGroup>
96+
8797
<!-- SDK targets override -->
8898
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true' AND Exists('$(ProtoOutputPath)')">
8999
<FSharpTargetsPath>$(ProtoOutputPath)\fsc\Microsoft.FSharp.Targets</FSharpTargetsPath>

azure-pipelines.yml

+58
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,64 @@ stages:
334334
continueOnError: true
335335
condition: failed()
336336

337+
# Windows With Compressed Metadata
338+
- job: WindowsCompressedMetadata
339+
pool:
340+
# The PR build definition sets this variable:
341+
# WindowsMachineQueueName=Windows.vs2022.amd64.open
342+
# and there is an alternate build definition that sets this to a queue that is always scouting the
343+
# next preview of Visual Studio.
344+
name: NetCore1ESPool-Public
345+
demands: ImageOverride -equals $(WindowsMachineQueueName)
346+
timeoutInMinutes: 120
347+
strategy:
348+
maxParallel: 4
349+
matrix:
350+
desktop_release:
351+
_configuration: Release
352+
_testKind: testDesktop
353+
coreclr_release:
354+
_configuration: Release
355+
_testKind: testCoreclr
356+
fsharpqa_release:
357+
_configuration: Release
358+
_testKind: testFSharpQA
359+
vs_release:
360+
_configuration: Release
361+
_testKind: testVs
362+
steps:
363+
- checkout: self
364+
clean: true
365+
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
366+
displayName: Build / Test
367+
- task: PublishTestResults@2
368+
displayName: Publish Test Results
369+
inputs:
370+
testResultsFormat: 'NUnit'
371+
testResultsFiles: '*.xml'
372+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)'
373+
continueOnError: true
374+
condition: ne(variables['_testKind'], 'testFSharpQA')
375+
- task: PublishBuildArtifacts@1
376+
displayName: Publish Test Logs
377+
inputs:
378+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
379+
ArtifactName: 'Windows $(_configuration) $(_testKind) test logs'
380+
publishLocation: Container
381+
continueOnError: true
382+
condition: failed()
383+
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
384+
displayName: Dump NuGet cache contents
385+
condition: failed()
386+
- task: PublishBuildArtifacts@1
387+
displayName: Publish NuGet cache contents
388+
inputs:
389+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents'
390+
ArtifactName: 'NuGetPackageContents Windows $(_testKind)'
391+
publishLocation: Container
392+
continueOnError: true
393+
condition: failed()
394+
337395
# Mock official build
338396
- job: MockOfficial
339397
pool:

eng/Build.ps1

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ param (
6262
[switch]$noVisualStudio,
6363
[switch]$sourceBuild,
6464
[switch]$skipBuild,
65-
65+
[switch]$compressAllMetadata,
6666
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)
6767

6868
Set-StrictMode -version 2.0
@@ -116,6 +116,7 @@ function Print-Usage() {
116116
Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported."
117117
Write-Host " -sourceBuild Simulate building for source-build."
118118
Write-Host " -skipbuild Skip building product"
119+
Write-Host " -compressAllMetadata Build product with compressed metadata"
119120
Write-Host ""
120121
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
121122
}
@@ -170,6 +171,10 @@ function Process-Arguments() {
170171
$script:binaryLog = $False;
171172
}
172173

174+
if ($compressAllMetadata) {
175+
$script:compressAllMetadata = $True;
176+
}
177+
173178
foreach ($property in $properties) {
174179
if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
175180
Write-Host "Invalid argument: $property"
@@ -228,6 +233,7 @@ function BuildSolution([string] $solutionName) {
228233
/p:QuietRestoreBinaryLog=$binaryLog `
229234
/p:TestTargetFrameworks=$testTargetFrameworks `
230235
/p:DotNetBuildFromSource=$sourceBuild `
236+
/p:CompressAllMetadata=$CompressAllMetadata `
231237
/v:$verbosity `
232238
$suppressExtensionDeployment `
233239
@properties

src/Compiler/Checking/CheckExpressions.fsi

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ val TcFieldInit: range -> ILFieldInit -> Const
126126
val LightweightTcValForUsingInBuildMethodCall:
127127
g: TcGlobals -> vref: ValRef -> vrefFlags: ValUseFlag -> vrefTypeInst: TTypes -> m: range -> Expr * TType
128128

129-
130129
/// Indicates whether a syntactic type is allowed to include new type variables
131130
/// not declared anywhere, e.g. `let f (x: 'T option) = x.Value`
132131
type ImplicitlyBoundTyparsAllowed =

src/Compiler/Driver/CompilerConfig.fs

+3
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ type TcConfigBuilder =
458458
mutable metadataVersion: string option
459459
mutable standalone: bool
460460
mutable extraStaticLinkRoots: string list
461+
mutable compressMetadata: bool
461462
mutable noSignatureData: bool
462463
mutable onlyEssentialOptimizationData: bool
463464
mutable useOptimizationDataFile: bool
@@ -682,6 +683,7 @@ type TcConfigBuilder =
682683
metadataVersion = None
683684
standalone = false
684685
extraStaticLinkRoots = []
686+
compressMetadata = false
685687
noSignatureData = false
686688
onlyEssentialOptimizationData = false
687689
useOptimizationDataFile = false
@@ -1230,6 +1232,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
12301232
member _.metadataVersion = data.metadataVersion
12311233
member _.standalone = data.standalone
12321234
member _.extraStaticLinkRoots = data.extraStaticLinkRoots
1235+
member _.compressMetadata = data.compressMetadata
12331236
member _.noSignatureData = data.noSignatureData
12341237
member _.onlyEssentialOptimizationData = data.onlyEssentialOptimizationData
12351238
member _.useOptimizationDataFile = data.useOptimizationDataFile

src/Compiler/Driver/CompilerConfig.fsi

+4
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ type TcConfigBuilder =
331331

332332
mutable extraStaticLinkRoots: string list
333333

334+
mutable compressMetadata: bool
335+
334336
mutable noSignatureData: bool
335337

336338
mutable onlyEssentialOptimizationData: bool
@@ -647,6 +649,8 @@ type TcConfig =
647649

648650
member extraStaticLinkRoots: string list
649651

652+
member compressMetadata: bool
653+
650654
member noSignatureData: bool
651655

652656
member onlyEssentialOptimizationData: bool

0 commit comments

Comments
 (0)