Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@
<DefineConstants>$(DefineConstants);TESTING_ON_LINUX</DefineConstants>
</PropertyGroup>


<!-- CompressAllMetadata is a switch set by the CI to do a test pass where we compress the metadata for the assemblies -->
<!-- We don't compress the proto-compiler yet, because no shipped compiler, and the arcade compiler don't yet support compression -->
<PropertyGroup Condition="'$(Configuration)' == 'Proto' or '$(CompressAllMetadata)' != 'true'">
<CompressMetadata>false</CompressMetadata>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Proto' and '$(CompressAllMetadata)' == 'true'">
<CompressMetadata>true</CompressMetadata>
</PropertyGroup>

<!-- SDK targets override -->
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true' AND Exists('$(ProtoOutputPath)')">
<FSharpTargetsPath>$(ProtoOutputPath)\fsc\Microsoft.FSharp.Targets</FSharpTargetsPath>
Expand Down
58 changes: 58 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,64 @@ stages:
continueOnError: true
condition: failed()

# Windows With Compressed Metadata
- job: WindowsCompressedMetadata
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: NetCore1ESPool-Public
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
strategy:
maxParallel: 4
matrix:
desktop_release:
_configuration: Release
_testKind: testDesktop
coreclr_release:
_configuration: Release
_testKind: testCoreclr
fsharpqa_release:
_configuration: Release
_testKind: testFSharpQA
vs_release:
_configuration: Release
_testKind: testVs
steps:
- checkout: self
clean: true
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)'
continueOnError: true
condition: ne(variables['_testKind'], 'testFSharpQA')
- task: PublishBuildArtifacts@1
displayName: Publish Test Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)'
ArtifactName: 'Windows $(_configuration) $(_testKind) test logs'
publishLocation: Container
continueOnError: true
condition: failed()
- script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj
displayName: Dump NuGet cache contents
condition: failed()
- task: PublishBuildArtifacts@1
displayName: Publish NuGet cache contents
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents'
ArtifactName: 'NuGetPackageContents Windows $(_testKind)'
publishLocation: Container
continueOnError: true
condition: failed()

# Mock official build
- job: MockOfficial
pool:
Expand Down
8 changes: 7 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ param (
[switch]$noVisualStudio,
[switch]$sourceBuild,
[switch]$skipBuild,

[switch]$compressAllMetadata,
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)

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

if ($compressAllMetadata) {
$script:compressAllMetadata = $True;
}

foreach ($property in $properties) {
if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
Write-Host "Invalid argument: $property"
Expand Down Expand Up @@ -228,6 +233,7 @@ function BuildSolution([string] $solutionName) {
/p:QuietRestoreBinaryLog=$binaryLog `
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:DotNetBuildFromSource=$sourceBuild `
/p:CompressAllMetadata=$CompressAllMetadata `
Comment thread
dsyme marked this conversation as resolved.
/v:$verbosity `
$suppressExtensionDeployment `
@properties
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Checking/CheckExpressions.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ val TcFieldInit: range -> ILFieldInit -> Const
val LightweightTcValForUsingInBuildMethodCall:
g: TcGlobals -> vref: ValRef -> vrefFlags: ValUseFlag -> vrefTypeInst: TTypes -> m: range -> Expr * TType


/// Indicates whether a syntactic type is allowed to include new type variables
/// not declared anywhere, e.g. `let f (x: 'T option) = x.Value`
type ImplicitlyBoundTyparsAllowed =
Expand Down
3 changes: 3 additions & 0 deletions src/Compiler/Driver/CompilerConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ type TcConfigBuilder =
mutable metadataVersion: string option
mutable standalone: bool
mutable extraStaticLinkRoots: string list
mutable compressMetadata: bool
mutable noSignatureData: bool
mutable onlyEssentialOptimizationData: bool
mutable useOptimizationDataFile: bool
Expand Down Expand Up @@ -682,6 +683,7 @@ type TcConfigBuilder =
metadataVersion = None
standalone = false
extraStaticLinkRoots = []
compressMetadata = false
noSignatureData = false
onlyEssentialOptimizationData = false
useOptimizationDataFile = false
Expand Down Expand Up @@ -1230,6 +1232,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
member _.metadataVersion = data.metadataVersion
member _.standalone = data.standalone
member _.extraStaticLinkRoots = data.extraStaticLinkRoots
member _.compressMetadata = data.compressMetadata
member _.noSignatureData = data.noSignatureData
member _.onlyEssentialOptimizationData = data.onlyEssentialOptimizationData
member _.useOptimizationDataFile = data.useOptimizationDataFile
Expand Down
4 changes: 4 additions & 0 deletions src/Compiler/Driver/CompilerConfig.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ type TcConfigBuilder =

mutable extraStaticLinkRoots: string list

mutable compressMetadata: bool

mutable noSignatureData: bool

mutable onlyEssentialOptimizationData: bool
Expand Down Expand Up @@ -647,6 +649,8 @@ type TcConfig =

member extraStaticLinkRoots: string list

member compressMetadata: bool

member noSignatureData: bool

member onlyEssentialOptimizationData: bool
Expand Down
Loading