diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props
index 3d0ccc3d95c..dbfb1860320 100644
--- a/FSharpBuild.Directory.Build.props
+++ b/FSharpBuild.Directory.Build.props
@@ -83,6 +83,16 @@
$(DefineConstants);TESTING_ON_LINUX
+
+
+
+
+ false
+
+
+ true
+
+
$(ProtoOutputPath)\fsc\Microsoft.FSharp.Targets
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index c66ed2f4a94..8d758b5360d 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -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:
diff --git a/eng/Build.ps1 b/eng/Build.ps1
index 010d465d5d4..af103f7911a 100644
--- a/eng/Build.ps1
+++ b/eng/Build.ps1
@@ -62,7 +62,7 @@ param (
[switch]$noVisualStudio,
[switch]$sourceBuild,
[switch]$skipBuild,
-
+ [switch]$compressAllMetadata,
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)
Set-StrictMode -version 2.0
@@ -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."
}
@@ -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"
@@ -228,6 +233,7 @@ function BuildSolution([string] $solutionName) {
/p:QuietRestoreBinaryLog=$binaryLog `
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:DotNetBuildFromSource=$sourceBuild `
+ /p:CompressAllMetadata=$CompressAllMetadata `
/v:$verbosity `
$suppressExtensionDeployment `
@properties
diff --git a/src/Compiler/Checking/CheckExpressions.fsi b/src/Compiler/Checking/CheckExpressions.fsi
index 3b70a5caa1e..0bbaca89177 100644
--- a/src/Compiler/Checking/CheckExpressions.fsi
+++ b/src/Compiler/Checking/CheckExpressions.fsi
@@ -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 =
diff --git a/src/Compiler/Driver/CompilerConfig.fs b/src/Compiler/Driver/CompilerConfig.fs
index 38c67e917f6..7a957b722da 100644
--- a/src/Compiler/Driver/CompilerConfig.fs
+++ b/src/Compiler/Driver/CompilerConfig.fs
@@ -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
@@ -682,6 +683,7 @@ type TcConfigBuilder =
metadataVersion = None
standalone = false
extraStaticLinkRoots = []
+ compressMetadata = false
noSignatureData = false
onlyEssentialOptimizationData = false
useOptimizationDataFile = false
@@ -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
diff --git a/src/Compiler/Driver/CompilerConfig.fsi b/src/Compiler/Driver/CompilerConfig.fsi
index 0ac2d8a0e86..461298b5d60 100644
--- a/src/Compiler/Driver/CompilerConfig.fsi
+++ b/src/Compiler/Driver/CompilerConfig.fsi
@@ -331,6 +331,8 @@ type TcConfigBuilder =
mutable extraStaticLinkRoots: string list
+ mutable compressMetadata: bool
+
mutable noSignatureData: bool
mutable onlyEssentialOptimizationData: bool
@@ -647,6 +649,8 @@ type TcConfig =
member extraStaticLinkRoots: string list
+ member compressMetadata: bool
+
member noSignatureData: bool
member onlyEssentialOptimizationData: bool
diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs
index 7d453dace33..b7738705788 100644
--- a/src/Compiler/Driver/CompilerImports.fs
+++ b/src/Compiler/Driver/CompilerImports.fs
@@ -9,6 +9,7 @@ open System.Collections.Generic
open System.Collections.Immutable
open System.Diagnostics
open System.IO
+open System.IO.Compression
open System.Reflection
open Internal.Utilities
@@ -54,27 +55,53 @@ let (++) x s = x @ [ s ]
let IsSignatureDataResource (r: ILResource) =
r.Name.StartsWithOrdinal FSharpSignatureDataResourceName
+ || r.Name.StartsWithOrdinal FSharpSignatureCompressedDataResourceName
|| r.Name.StartsWithOrdinal FSharpSignatureDataResourceName2
let IsOptimizationDataResource (r: ILResource) =
r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName
+ || r.Name.StartsWithOrdinal FSharpOptimizationCompressedDataResourceName
|| r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName2
-let GetSignatureDataResourceName (r: ILResource) =
- if r.Name.StartsWithOrdinal FSharpSignatureDataResourceName then
- String.dropPrefix r.Name FSharpSignatureDataResourceName
- elif r.Name.StartsWithOrdinal FSharpSignatureDataResourceName2 then
- String.dropPrefix r.Name FSharpSignatureDataResourceName2
+let decompressResource (r: ILResource) =
+ use raw = r.GetBytes().AsStream()
+ use decompressed = new MemoryStream()
+ use deflator = new DeflateStream(raw, CompressionMode.Decompress)
+ deflator.CopyTo decompressed
+ deflator.Close()
+ ByteStorage.FromByteArray(decompressed.ToArray()).GetByteMemory()
+
+let GetResourceNameAndSignatureDataFunc (r: ILResource) =
+ let resourceType, ccuName =
+ if r.Name.StartsWithOrdinal FSharpSignatureDataResourceName then
+ FSharpSignatureDataResourceName, String.dropPrefix r.Name FSharpSignatureDataResourceName
+ elif r.Name.StartsWithOrdinal FSharpSignatureCompressedDataResourceName then
+ FSharpSignatureCompressedDataResourceName, String.dropPrefix r.Name FSharpSignatureCompressedDataResourceName
+ elif r.Name.StartsWithOrdinal FSharpSignatureDataResourceName2 then
+ FSharpSignatureDataResourceName2, String.dropPrefix r.Name FSharpSignatureDataResourceName2
+ else
+ failwith "GetSignatureDataResourceName"
+
+ if resourceType = FSharpSignatureCompressedDataResourceName then
+ ccuName, (fun () -> decompressResource (r))
else
- failwith "GetSignatureDataResourceName"
+ ccuName, (fun () -> r.GetBytes())
+
+let GetResourceNameAndOptimizationDataFunc (r: ILResource) =
+ let resourceType, ccuName =
+ if r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName then
+ FSharpOptimizationDataResourceName, String.dropPrefix r.Name FSharpOptimizationDataResourceName
+ elif r.Name.StartsWithOrdinal FSharpOptimizationCompressedDataResourceName then
+ FSharpOptimizationCompressedDataResourceName, String.dropPrefix r.Name FSharpOptimizationCompressedDataResourceName
+ elif r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName2 then
+ FSharpOptimizationDataResourceName2, String.dropPrefix r.Name FSharpOptimizationDataResourceName2
+ else
+ failwith "GetOptimizationDataResourceName"
-let GetOptimizationDataResourceName (r: ILResource) =
- if r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName then
- String.dropPrefix r.Name FSharpOptimizationDataResourceName
- elif r.Name.StartsWithOrdinal FSharpOptimizationDataResourceName2 then
- String.dropPrefix r.Name FSharpOptimizationDataResourceName2
+ if resourceType = FSharpOptimizationCompressedDataResourceName then
+ ccuName, (fun () -> decompressResource (r))
else
- failwith "GetOptimizationDataResourceName"
+ ccuName, (fun () -> r.GetBytes())
let IsReflectedDefinitionsResource (r: ILResource) =
r.Name.StartsWithOrdinal(QuotationPickler.SerializedReflectedDefinitionsResourceNameBase)
@@ -88,18 +115,23 @@ let MakeILResource rName bytes =
MetadataIndex = NoMetadataIdx
}
-let PickleToResource inMem file (g: TcGlobals) scope rName p x =
+let PickleToResource inMem file (g: TcGlobals) compress scope rName p x =
let file = PathMap.apply g.pathMap file
- let bytes = pickleObjWithDanglingCcus inMem file g scope p x
+ let bytes =
+ use bytes = pickleObjWithDanglingCcus inMem file g scope p x
- let byteStorage =
- if inMem then
- ByteStorage.FromMemoryAndCopy(bytes.AsMemory(), useBackingMemoryMappedFile = true)
+ if compress then
+ let raw = new MemoryStream(bytes.AsMemory().ToArray())
+ let compressed = new MemoryStream()
+ use deflator = new DeflateStream(compressed, CompressionLevel.Optimal)
+ raw.CopyTo deflator
+ deflator.Close()
+ compressed.ToArray()
else
- ByteStorage.FromByteArray(bytes.AsMemory().ToArray())
+ bytes.AsMemory().ToArray()
- (bytes :> IDisposable).Dispose()
+ let byteStorage = ByteStorage.FromByteArray(bytes)
{
Name = rName
@@ -113,15 +145,17 @@ let GetSignatureData (file, ilScopeRef, ilModule, byteReader) : PickledDataWithR
unpickleObjWithDanglingCcus file ilScopeRef ilModule unpickleCcuInfo (byteReader ())
let WriteSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, ccu: CcuThunk, fileName, inMem) : ILResource =
- let mspec = ccu.Contents
- let mspec = ApplyExportRemappingToEntity tcGlobals exportRemapping mspec
+ let mspec = ApplyExportRemappingToEntity tcGlobals exportRemapping ccu.Contents
+
// For historical reasons, we use a different resource name for FSharp.Core, so older F# compilers
// don't complain when they see the resource.
- let rName =
- if ccu.AssemblyName = getFSharpCoreLibraryName then
- FSharpSignatureDataResourceName2
+ let rName, compress =
+ if tcConfig.compressMetadata then
+ FSharpSignatureCompressedDataResourceName, true
+ elif ccu.AssemblyName = getFSharpCoreLibraryName then
+ FSharpSignatureDataResourceName2, false
else
- FSharpSignatureDataResourceName
+ FSharpSignatureDataResourceName, false
let includeDir =
if String.IsNullOrEmpty tcConfig.implicitIncludeDir then
@@ -135,6 +169,7 @@ let WriteSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, ccu: Ccu
inMem
fileName
tcGlobals
+ compress
ccu
(rName + ccu.AssemblyName)
pickleCcuInfo
@@ -147,34 +182,23 @@ let WriteSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, ccu: Ccu
let GetOptimizationData (file, ilScopeRef, ilModule, byteReader) =
unpickleObjWithDanglingCcus file ilScopeRef ilModule Optimizer.u_CcuOptimizationInfo (byteReader ())
-let WriteOptimizationData (tcGlobals, fileName, inMem, ccu: CcuThunk, modulInfo) =
+let WriteOptimizationData (tcConfig: TcConfig, tcGlobals, fileName, inMem, ccu: CcuThunk, modulInfo) =
// For historical reasons, we use a different resource name for FSharp.Core, so older F# compilers
// don't complain when they see the resource.
- let rName =
- if ccu.AssemblyName = getFSharpCoreLibraryName then
- FSharpOptimizationDataResourceName2
+ let rName, compress =
+ if tcConfig.compressMetadata then
+ FSharpOptimizationCompressedDataResourceName, true
+ elif ccu.AssemblyName = getFSharpCoreLibraryName then
+ FSharpOptimizationDataResourceName2, false
else
- FSharpOptimizationDataResourceName
+ FSharpOptimizationDataResourceName, false
- PickleToResource inMem fileName tcGlobals ccu (rName + ccu.AssemblyName) Optimizer.p_CcuOptimizationInfo modulInfo
+ PickleToResource inMem fileName tcGlobals compress ccu (rName + ccu.AssemblyName) Optimizer.p_CcuOptimizationInfo modulInfo
let EncodeSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, isIncrementalBuild) =
if tcConfig.GenerateSignatureData then
let resource =
WriteSignatureData(tcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, isIncrementalBuild)
- // The resource gets written to a file for FSharp.Core
- let useDataFiles =
- (tcConfig.useOptimizationDataFile || tcGlobals.compilingFSharpCore)
- && not isIncrementalBuild
-
- if useDataFiles then
- let sigDataFileName = (FileSystemUtils.chopExtension outfile) + ".sigdata"
- let bytes = resource.GetBytes()
-
- use fileStream =
- FileSystem.OpenFileForWriteShim(sigDataFileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None)
-
- bytes.CopyTo fileStream
let resources = [ resource ]
@@ -188,23 +212,6 @@ let EncodeSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, generat
let EncodeOptimizationData (tcGlobals, tcConfig: TcConfig, outfile, exportRemapping, data, isIncrementalBuild) =
if tcConfig.GenerateOptimizationData then
let data = map2Of2 (Optimizer.RemapOptimizationInfo tcGlobals exportRemapping) data
- // As with the sigdata file, the optdata gets written to a file for FSharp.Core
- let useDataFiles =
- (tcConfig.useOptimizationDataFile || tcGlobals.compilingFSharpCore)
- && not isIncrementalBuild
-
- if useDataFiles then
- let ccu, modulInfo = data
-
- let bytes =
- pickleObjWithDanglingCcus isIncrementalBuild outfile tcGlobals ccu Optimizer.p_CcuOptimizationInfo modulInfo
-
- let optDataFileName = (FileSystemUtils.chopExtension outfile) + ".optdata"
-
- use fileStream =
- FileSystem.OpenFileForWriteShim(optDataFileName, FileMode.Create, FileAccess.ReadWrite, FileShare.None)
-
- fileStream.Write(bytes)
let ccu, optData =
if tcConfig.onlyEssentialOptimizationData then
@@ -212,7 +219,9 @@ let EncodeOptimizationData (tcGlobals, tcConfig: TcConfig, outfile, exportRemapp
else
data
- [ WriteOptimizationData(tcGlobals, outfile, isIncrementalBuild, ccu, optData) ]
+ [
+ WriteOptimizationData(tcConfig, tcGlobals, outfile, isIncrementalBuild, ccu, optData)
+ ]
else
[]
@@ -846,10 +855,9 @@ type RawFSharpAssemblyDataBackedByFileOnDisk(ilModule: ILModuleDef, ilAssemblyRe
let sigDataReaders =
[
- for iresource in resources do
- if IsSignatureDataResource iresource then
- let ccuName = GetSignatureDataResourceName iresource
- (ccuName, (fun () -> iresource.GetBytes()))
+ for r in resources do
+ if IsSignatureDataResource r then
+ GetResourceNameAndSignatureDataFunc r
]
let sigDataReaders =
@@ -877,7 +885,7 @@ type RawFSharpAssemblyDataBackedByFileOnDisk(ilModule: ILModuleDef, ilAssemblyRe
ilModule.Resources.AsList()
|> List.choose (fun r ->
if IsOptimizationDataResource r then
- Some(GetOptimizationDataResourceName r, (fun () -> r.GetBytes()))
+ Some(GetResourceNameAndOptimizationDataFunc r)
else
None)
@@ -938,17 +946,16 @@ type RawFSharpAssemblyData(ilModule: ILModuleDef, ilAssemblyRefs) =
let resources = ilModule.Resources.AsList()
[
- for iresource in resources do
- if IsSignatureDataResource iresource then
- let ccuName = GetSignatureDataResourceName iresource
- (ccuName, (fun () -> iresource.GetBytes()))
+ for r in resources do
+ if IsSignatureDataResource r then
+ GetResourceNameAndSignatureDataFunc r
]
member _.GetRawFSharpOptimizationData(_, _, _) =
ilModule.Resources.AsList()
|> List.choose (fun r ->
if IsOptimizationDataResource r then
- Some(GetOptimizationDataResourceName r, (fun () -> r.GetBytes()))
+ Some(GetResourceNameAndOptimizationDataFunc r)
else
None)
diff --git a/src/Compiler/Driver/CompilerImports.fsi b/src/Compiler/Driver/CompilerImports.fsi
index 9a3e9b517ef..d6be5bbd60b 100644
--- a/src/Compiler/Driver/CompilerImports.fsi
+++ b/src/Compiler/Driver/CompilerImports.fsi
@@ -17,6 +17,7 @@ open FSharp.Compiler.TypedTree
open FSharp.Compiler.TypedTreeOps
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.BuildGraph
+open FSharp.Compiler.IO
open FSharp.Compiler.Text
open FSharp.Core.CompilerServices
@@ -42,7 +43,7 @@ val IsOptimizationDataResource: ILResource -> bool
/// Determine if an IL resource attached to an F# assembly is an F# quotation data resource for reflected definitions
val IsReflectedDefinitionsResource: ILResource -> bool
-val GetSignatureDataResourceName: ILResource -> string
+val GetResourceNameAndSignatureDataFunc: ILResource -> string * (unit -> ReadOnlyByteMemory)
/// Encode the F# interface data into a set of IL attributes and resources
val EncodeSignatureData:
diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs
index 7bbecb8916b..0eb19af39b6 100644
--- a/src/Compiler/Driver/CompilerOptions.fs
+++ b/src/Compiler/Driver/CompilerOptions.fs
@@ -922,6 +922,14 @@ let outputFileFlagsFsc (tcConfigB: TcConfigBuilder) =
Some(FSComp.SR.optsPlatform ())
)
+ CompilerOption(
+ "compressmetadata",
+ tagNone,
+ OptionSwitch(fun switch -> tcConfigB.compressMetadata <- switch = OptionSwitch.On),
+ None,
+ Some(FSComp.SR.optsCompressMetadata ())
+ )
+
CompilerOption(
"nooptimizationdata",
tagNone,
diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt
index c749444f32c..4e6eec610f9 100644
--- a/src/Compiler/FSComp.txt
+++ b/src/Compiler/FSComp.txt
@@ -847,6 +847,7 @@ optsPublicSign,"Public-sign the assembly using only the public portion of the st
optsWriteXml,"Write the xmldoc of the assembly to the given file"
optsStrongKeyFile,"Specify a strong name key file"
optsStrongKeyContainer,"Specify a strong name key container"
+optsCompressMetadata,"Compress interface and optimization data files"
optsPlatform,"Limit which platforms this code can run on: x86, x64, Arm, Arm64, Itanium, anycpu32bitpreferred, or anycpu. The default is anycpu."
optsNoOpt,"Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility."
optsNoInterface,"Don't add a resource to the generated assembly containing F#-specific metadata"
@@ -928,6 +929,10 @@ optsTargetProfile,"Specify target framework profile of this assembly. Valid valu
optsEmitDebugInfoInQuotations,"Emit debug information in quotations"
optsPreferredUiLang,"Specify the preferred output language culture name (e.g. es-ES, ja-JP)"
optsNoCopyFsharpCore,"Don't copy FSharp.Core.dll along the produced binaries"
+optsSignatureData,"Include F# interface information, the default is file. Essential for distributing libraries."
+1046,optsUnknownSignatureData,"Invalid value '%s' for --interfacedata, valid value are: none, file, compress.""
+optsOptimizationData,"Specify included optimization information, the default is file. Important for distributed libraries."
+1047,optsUnknownOptimizationData,"Invalid value '%s' for --optimizationdata, valid value are: none, file, compress."
1051,optsInvalidSubSystemVersion,"Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater."
1052,optsInvalidTargetProfile,"Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'."
typeInfoFullName,"Full name"
diff --git a/src/Compiler/FSharp.Compiler.Service.fsproj b/src/Compiler/FSharp.Compiler.Service.fsproj
index 5f53b8b610d..b239d13f8a2 100644
--- a/src/Compiler/FSharp.Compiler.Service.fsproj
+++ b/src/Compiler/FSharp.Compiler.Service.fsproj
@@ -27,6 +27,11 @@
false
+
+
+ true
+
+
$(IntermediateOutputPath)$(TargetFramework)\$(IntermediateOutputPath)$(TargetFramework)\
diff --git a/src/Compiler/Service/IncrementalBuild.fs b/src/Compiler/Service/IncrementalBuild.fs
index 96e0c8ef1cc..45e50d441bf 100644
--- a/src/Compiler/Service/IncrementalBuild.fs
+++ b/src/Compiler/Service/IncrementalBuild.fs
@@ -7,6 +7,7 @@ open System.Collections.Generic
open System.Collections.Immutable
open System.Diagnostics
open System.IO
+open System.IO.Compression
open System.Threading
open Internal.Utilities.Library
open Internal.Utilities.Collections
@@ -29,6 +30,7 @@ open FSharp.Compiler.IO
open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.NameResolution
open FSharp.Compiler.ParseAndCheckInputs
+open FSharp.Compiler.Syntax.PrettyNaming
open FSharp.Compiler.ScriptClosure
open FSharp.Compiler.Syntax
open FSharp.Compiler.TcGlobals
@@ -701,8 +703,8 @@ type RawFSharpAssemblyDataBackedByLanguageService (tcConfig, tcGlobals, generate
let sigData =
let _sigDataAttributes, sigDataResources = EncodeSignatureData(tcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, true)
[ for r in sigDataResources do
- let ccuName = GetSignatureDataResourceName r
- yield (ccuName, (fun () -> r.GetBytes())) ]
+ GetResourceNameAndSignatureDataFunc r
+ ]
let autoOpenAttrs = topAttrs.assemblyAttrs |> List.choose (List.singleton >> TryFindFSharpStringAttribute tcGlobals tcGlobals.attrib_AutoOpenAttribute)
diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fs b/src/Compiler/SyntaxTree/PrettyNaming.fs
index b4ba20670f8..4ab6f181358 100755
--- a/src/Compiler/SyntaxTree/PrettyNaming.fs
+++ b/src/Compiler/SyntaxTree/PrettyNaming.fs
@@ -1097,15 +1097,22 @@ let GetLongNameFromString x = SplitNamesForILPath x
// Resource format for pickled data
//--------------------------------------------------------------------------
+// Uncompressed OptimizationData/SignatureData name for embedded resource
let FSharpOptimizationDataResourceName = "FSharpOptimizationData."
-
let FSharpSignatureDataResourceName = "FSharpSignatureData."
+// Compressed OptimizationData/SignatureData name for embedded resource
+let FSharpOptimizationCompressedDataResourceName =
+ "FSharpOptimizationCompressedData."
+
+let FSharpSignatureCompressedDataResourceName = "FSharpSignatureCompressedData."
+
// For historical reasons, we use a different resource name for FSharp.Core, so older F# compilers
// don't complain when they see the resource. The prefix of these names must not be 'FSharpOptimizationData'
// or 'FSharpSignatureData'
-let FSharpOptimizationDataResourceName2 = "FSharpOptimizationInfo."
+// Uncompressed OptimizationData/SignatureData name for FSharp.Core embedded resources
+let FSharpOptimizationDataResourceName2 = "FSharpOptimizationInfo."
let FSharpSignatureDataResourceName2 = "FSharpSignatureInfo."
[]
diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fsi b/src/Compiler/SyntaxTree/PrettyNaming.fsi
index 01f2918712f..61bf5a19ddb 100644
--- a/src/Compiler/SyntaxTree/PrettyNaming.fsi
+++ b/src/Compiler/SyntaxTree/PrettyNaming.fsi
@@ -271,6 +271,10 @@ val internal FSharpOptimizationDataResourceName: string
val internal FSharpSignatureDataResourceName: string
+val internal FSharpOptimizationCompressedDataResourceName: string
+
+val internal FSharpSignatureCompressedDataResourceName: string
+
val internal FSharpOptimizationDataResourceName2: string
val internal FSharpSignatureDataResourceName2: string
diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf
index 8c2f6fe5f54..ff2bd508550 100644
--- a/src/Compiler/xlf/FSComp.txt.cs.xlf
+++ b/src/Compiler/xlf/FSComp.txt.cs.xlf
@@ -472,6 +472,11 @@
Vymazat mezipaměť výsledků správce balíčků
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Neplatné použití generování referenčního sestavení, nepoužívejte --staticlink ani --refonly a --refout společně.
@@ -487,6 +492,11 @@
Zobrazte si povolené hodnoty verze jazyka a pak zadejte požadovanou verzi, například latest nebo preview.
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Podporované jazykové verze:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listNerozpoznaná hodnota {0} pro parametr --langversion; seznam možností zobrazíte zadáním --langversion:?
diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf
index 68e2a3f1eb7..3067a772651 100644
--- a/src/Compiler/xlf/FSComp.txt.de.xlf
+++ b/src/Compiler/xlf/FSComp.txt.de.xlf
@@ -472,6 +472,11 @@
Löschen Sie den Ergebniscache des Paketmanagers
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Ungültige Verwendung der Ausgabe einer Referenzassembly. Verwenden Sie nicht "--staticlink" oder "--refonly" und "--refout" zusammen.
@@ -487,6 +492,11 @@
Zeigen Sie die zulässigen Werte für die Sprachversion an. Geben Sie die Sprachversion als "latest" oder "preview" an.
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Unterstützte Sprachversionen:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listUnbekannter Wert "{0}" für "--langversion". Verwenden Sie "--langversion:?", um die vollständige Liste anzuzeigen.
diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf
index bea08c9779f..c2456360c25 100644
--- a/src/Compiler/xlf/FSComp.txt.es.xlf
+++ b/src/Compiler/xlf/FSComp.txt.es.xlf
@@ -472,6 +472,11 @@
Borrar la caché de resultados del administrador de paquetes
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Uso no válido de emitir un ensamblado de referencia, no use "--staticlink', or '--refonly' and '--refout" de forma conjunta.
@@ -487,6 +492,11 @@
Mostrar los valores permitidos para la versión de idioma, especificar la versión de idioma como "latest" "preview"
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Versiones de lenguaje admitidas:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listValor no reconocido "{0}" para --langversion, use --langversion:? para una lista completa
diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf
index 227a9b0bd32..a238ba0136f 100644
--- a/src/Compiler/xlf/FSComp.txt.fr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.fr.xlf
@@ -472,6 +472,11 @@
Effacer le cache des résultats du Gestionnaire de package
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Utilisation non valide de l’émission d’un assembly de référence. N’utilisez pas '--staticlink' ni '--refonly' et '--refout' ensemble.
@@ -487,6 +492,11 @@
Afficher les valeurs autorisées pour la version du langage, spécifier la version du langage comme 'dernière' ou 'préversion'
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Versions linguistiques prises en charge :
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listValeur non reconnue '{0}' pour --langversion use --langversion:? pour la liste complète
diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf
index 4ebe76e823c..a7cc725c625 100644
--- a/src/Compiler/xlf/FSComp.txt.it.xlf
+++ b/src/Compiler/xlf/FSComp.txt.it.xlf
@@ -472,6 +472,11 @@
Cancellare la cache dei risultati di Gestione pacchetti
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Utilizzo non valido della creazione di un assembly di riferimento. Non usare insieme '--staticlink' o '--refonly' e '--refout'.
@@ -487,6 +492,11 @@
Visualizza i valori consentiti per la versione del linguaggio. Specificare la versione del linguaggio, ad esempio 'latest' o 'preview'
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Versioni del linguaggio supportate:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listValore '{0}' non riconosciuto per --langversion. Per l'elenco completo usare --langversion:?
diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf
index 3d330529d59..5b49c4bd125 100644
--- a/src/Compiler/xlf/FSComp.txt.ja.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ja.xlf
@@ -472,6 +472,11 @@
パッケージ マネージャーの結果キャッシュをクリアする
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.参照アセンブリの生成の使用が無効です。'--staticlink'、または '--refonly' と '--refout' を同時に使用しないでください。
@@ -487,6 +492,11 @@
言語バージョンで許可された値を表示し、'最新' や 'プレビュー' などの言語バージョンを指定する
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:サポートされる言語バージョン:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete list--langversion の値 '{0}' が認識されません。完全なリストについては、--langversion:? を使用してください
diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf
index fb1cc618ecb..e3d5a493923 100644
--- a/src/Compiler/xlf/FSComp.txt.ko.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ko.xlf
@@ -472,6 +472,11 @@
패키지 관리자 결과 캐시 지우기
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.참조 어셈블리 내보내기를 잘못 사용했습니다. '--staticlink' 또는 '--refonly' 및 '--refout'을 함께 사용하지 마세요.
@@ -487,6 +492,11 @@
언어 버전의 허용된 값을 표시하고 '최신' 또는 '미리 보기'와 같은 언어 버전을 지정합니다.
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:지원되는 언어 버전:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete list전체 목록에 대한 --langversion use --langversion:?의 인식할 수 없는 값 '{0}'입니다.
diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf
index d8e30e88c62..3b02a48f812 100644
--- a/src/Compiler/xlf/FSComp.txt.pl.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pl.xlf
@@ -472,6 +472,11 @@
Wyczyść pamięć podręczną wyników menedżera pakietów
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Nieprawidłowe użycie emitowania zestawu odwołania, nie używaj razem elementów „--staticlink” ani „--refonly” i „--refout”.
@@ -487,6 +492,11 @@
Wyświetl dozwolone wartości dla wersji językowej; określ wersję językową, np. „latest” lub „preview”
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Obsługiwane wersje językowe:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listNierozpoznana wartość „{0}” dla parametru –langversion; podaj parametr –langversion:?, aby uzyskać pełną listę
diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
index aeeba1d4271..ddc53052a3e 100644
--- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
@@ -472,6 +472,11 @@
Limpar o cache de resultados do gerenciador de pacotes
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Uso inválido de emitir um assembly de referência, não use '--staticlink' ou '--reutilly' e '--refout' juntos.
@@ -487,6 +492,11 @@
Exibe os valores permitidos para a versão do idioma, especifica a versão do idioma, como 'mais recente ' ou 'prévia'
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Versões de linguagens com suporte:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listValor não reconhecido '{0}' para --langversion use --langversion:? para a lista completa
diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf
index 5959290379e..a87376fa075 100644
--- a/src/Compiler/xlf/FSComp.txt.ru.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ru.xlf
@@ -472,6 +472,11 @@
Очистка кэша результатов диспетчера пакетов
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Недопустимое использование при создании базовой сборки. Не используйте "--staticlink" или "--refonly" и "--refout" вместе.
@@ -487,6 +492,11 @@
Отображение допустимых значений для версии языка. Укажите версию языка, например, "latest" или "preview".
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Поддерживаемые языковые версии:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete listНе удалось распознать значение "{0}" для параметра --langversion. Для получения полного списка допустимых значений выполните команду use --langversion:?
diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf
index 37583dc87c5..88856174155 100644
--- a/src/Compiler/xlf/FSComp.txt.tr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.tr.xlf
@@ -472,6 +472,11 @@
Paket yöneticisi sonuçları önbelleğini temizle
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.Başvuru bütünleştirilmiş kodunun oluşturulması için geçersiz kullanım: '--staticlink' veya '--refonly' ile '--refout' birlikte kullanılmaz.
@@ -487,6 +492,11 @@
Dil sürümü için izin verilen değerleri görüntüleyin, dil sürümünü 'en son' veya 'önizleme' örneklerindeki gibi belirtin
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:Desteklenen dil sürümleri:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete list--langversion için '{0}' değeri tanınmıyor. Tam liste için --langversion:? kullanın
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
index a627b09742f..d45f95ac8bc 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
@@ -472,6 +472,11 @@
清除包管理器结果缓存
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.发出引用程序集的使用无效,请勿同时使用“--staticlink”或“--refonly”和“--refout”。
@@ -487,6 +492,11 @@
显示语言版本的允许值,指定语言版本,如“最新”或“预览”
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:支持的语言版本:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete list--langversion 的值“{0}”无法识别,使用 --langversion:? 获取完整列表。
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
index dd69d33f792..981d2f170aa 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
@@ -472,6 +472,11 @@
清除封裝管理員結果快取
+
+ Compress interface and optimization data files
+ Compress interface and optimization data files
+
+ Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.發出參考組件的使用無效,請勿同時使用 '--staticlink' 或 '--refonly' 和 '--refout'。
@@ -487,6 +492,11 @@
顯示語言版本允許的值,指定 'latest' 或 'preview' 等語言版本
+
+ Specify included optimization information, the default is file. Important for distributed libraries.
+ Specify included optimization information, the default is file. Important for distributed libraries.
+
+ The pdb output file name cannot match the build output filename use --pdb:filename.pdbThe pdb output file name cannot match the build output filename use --pdb:filename.pdb
@@ -507,11 +517,26 @@
Disable implicit generation of constructs using reflection
+
+ Include F# interface information, the default is file. Essential for distributing libraries.
+ Include F# interface information, the default is file. Essential for distributing libraries.
+
+ Supported language versions:支援的語言版本:
+
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+ Invalid value '{0}' for --optimizationdata, valid value are: none, file, compress.
+
+
+
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+ Invalid value '{0}' for --interfacedata, valid value are: none, file, compress."
+
+ Unrecognized value '{0}' for --langversion use --langversion:? for complete list對 --langversion 為無法識別的值 '{0}',對完整清單使用 --langversion:?
diff --git a/src/FSharp.Build/FSharp.Build.fsproj b/src/FSharp.Build/FSharp.Build.fsproj
index 9bfe2497b45..1d2670fbc84 100644
--- a/src/FSharp.Build/FSharp.Build.fsproj
+++ b/src/FSharp.Build/FSharp.Build.fsproj
@@ -18,6 +18,11 @@
Debug;Release;Proto
+
+
+ true
+
+
diff --git a/src/FSharp.Build/Fsc.fs b/src/FSharp.Build/Fsc.fs
index 909354e83e7..af7e16d13cc 100644
--- a/src/FSharp.Build/Fsc.fs
+++ b/src/FSharp.Build/Fsc.fs
@@ -27,6 +27,7 @@ type public Fsc() as this =
let mutable codePage: string MaybeNull = null
let mutable commandLineArgs: ITaskItem list = []
let mutable compilerTools: ITaskItem[] = [||]
+ let mutable compressMetadata = false
let mutable debugSymbols = false
let mutable debugType: string MaybeNull = null
let mutable defineConstants: ITaskItem[] = [||]
@@ -42,6 +43,8 @@ type public Fsc() as this =
let mutable keyFile: string MaybeNull = null
let mutable langVersion: string MaybeNull = null
let mutable noFramework = false
+ let mutable noInterfaceData = false
+ let mutable noOptimizationData = false
let mutable optimize: bool = true
let mutable otherFlags: string MaybeNull = null
let mutable outputAssembly: string MaybeNull = null
@@ -151,9 +154,21 @@ type public Fsc() as this =
if noFramework then
builder.AppendSwitch("--noframework")
+ // NoInterfaceData
+ if noInterfaceData then
+ builder.AppendSwitch("--nointerfacedata")
+
+ // NoOptimizationData
+ if noOptimizationData then
+ builder.AppendSwitch("--nooptimizationdata")
+
// BaseAddress
builder.AppendSwitchIfNotNull("--baseaddress:", baseAddress)
+ // CompressMetadata
+ if compressMetadata then
+ builder.AppendSwitch("--compressmetadata")
+
// DefineConstants
for item in defineConstants do
builder.AppendSwitchIfNotNull("--define:", item.ItemSpec)
@@ -358,6 +373,11 @@ type public Fsc() as this =
with get () = compilerTools
and set (a) = compilerTools <- a
+ // CompressMetadata
+ member _.CompressMetadata
+ with get () = compressMetadata
+ and set (v) = compressMetadata <- v
+
// -g: Produce debug file. Disables optimizations if a -O flag is not given.
member _.DebugSymbols
with get () = debugSymbols
@@ -438,6 +458,16 @@ type public Fsc() as this =
with get () = noFramework
and set (b) = noFramework <- b
+ // --nointerfacedata
+ member _.NoInterfaceData
+ with get () = noInterfaceData
+ and set (b) = noInterfaceData <- b
+
+ // --nooptimizationdata
+ member _.NoOptimizationData
+ with get () = noOptimizationData
+ and set (b) = noOptimizationData <- b
+
// --optimize
member _.Optimize
with get () = optimize
diff --git a/src/FSharp.Build/Microsoft.FSharp.Targets b/src/FSharp.Build/Microsoft.FSharp.Targets
index 26d9a170882..31bde3076ff 100644
--- a/src/FSharp.Build/Microsoft.FSharp.Targets
+++ b/src/FSharp.Build/Microsoft.FSharp.Targets
@@ -327,6 +327,7 @@ this file.
ChecksumAlgorithm="$(PdbChecksumAlgorithm)"
CodePage="$(CodePage)"
CompilerTools="@(FscCompilerTools)"
+ CompressMetadata="$(CompressMetadata)"
DebugSymbols="$(DebugSymbols)"
DebugType="$(DebugType)"
DefineConstants="$(DefineConstants)"
@@ -343,6 +344,8 @@ this file.
LangVersion="$(LangVersion)"
LCID="$(LCID)"
NoFramework="true"
+ NoInterfaceData="$(NoInterfaceData)"
+ NoOptimizationData="$(NoOptimizationData)"
Optimize="$(Optimize)"
ReflectionFree="$(ReflectionFree)"
OtherFlags="$(FscOtherFlags)"
diff --git a/src/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj b/src/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
index e8561e03080..12952536046 100644
--- a/src/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
+++ b/src/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
@@ -9,6 +9,11 @@
true
+
+
+ true
+
+
diff --git a/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj b/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
index b2c7d204445..d63c3ce02f9 100644
--- a/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
+++ b/src/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
@@ -8,6 +8,11 @@
true
+
+
+ true
+
+
diff --git a/src/FSharp.Core/FSharp.Core.fsproj b/src/FSharp.Core/FSharp.Core.fsproj
index 2059fcc6096..2c78bf6cfee 100644
--- a/src/FSharp.Core/FSharp.Core.fsproj
+++ b/src/FSharp.Core/FSharp.Core.fsproj
@@ -39,6 +39,11 @@
Debug;Release;Proto
+
+
+ true
+
+
true
diff --git a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj
index 8bf96070658..2425866f41b 100644
--- a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj
+++ b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj
@@ -12,6 +12,11 @@
true
+
+
+ true
+
+
$(BaseOutputPath)\$(Configuration)\$(TargetFramework)
diff --git a/src/fsc/fsc.targets b/src/fsc/fsc.targets
index 9e4e4e48067..ee9688f53fa 100644
--- a/src/fsc/fsc.targets
+++ b/src/fsc/fsc.targets
@@ -20,6 +20,12 @@
false
+
+
+ true
+ true
+
+
diff --git a/src/fsi/fsi.targets b/src/fsi/fsi.targets
index 6b6e89dc6f4..b66ca4b2241 100644
--- a/src/fsi/fsi.targets
+++ b/src/fsi/fsi.targets
@@ -24,6 +24,11 @@
$(DefineConstants);FSI_SHADOW_COPY_REFERENCES;FSI_SERVER
+
+
+ true
+
+
diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
index f9c57fa0386..4f88cb393bb 100644
--- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
+++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj
@@ -53,6 +53,7 @@
+ allruntime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs
index 34c5cb5beaf..ffaf1a5f925 100644
--- a/tests/FSharp.Test.Utilities/TestFramework.fs
+++ b/tests/FSharp.Test.Utilities/TestFramework.fs
@@ -44,6 +44,7 @@ module Commands =
let executeProcess pathToExe arguments workingDir (timeout:int) =
match pathToExe with
| Some path ->
+ let commandLine = ResizeArray()
let errorsList = ResizeArray()
let outputList = ResizeArray()
let mutable errorslock = obj
@@ -56,6 +57,9 @@ module Commands =
if not (isNull message) then
lock errorslock (fun () -> errorsList.Add(message))
+ commandLine.Add $"cd {workingDir}"
+ commandLine.Add $"{path} {arguments} /bl"
+
let psi = ProcessStartInfo()
psi.FileName <- path
psi.WorkingDirectory <- workingDir
@@ -94,6 +98,7 @@ module Commands =
workingDir
lock gate (fun () ->
+ File.WriteAllLines(Path.Combine(workingDir', "commandline.txt"), commandLine)
File.WriteAllLines(Path.Combine(workingDir', "StandardOutput.txt"), outputList)
File.WriteAllLines(Path.Combine(workingDir', "StandardError.txt"), errorsList)
)
@@ -225,6 +230,7 @@ type TestConfig =
FSIANYCPU : string
FSCANYCPU : string
#endif
+ DOTNETFSCCOMPILERPATH : string
FSI_FOR_SCRIPTS : string
FSharpBuild : string
FSharpCompilerInteractiveSettings : string
@@ -293,14 +299,15 @@ let config configurationName envVars =
let fsharpCoreArchitecture = "netstandard2.0"
let fsharpBuildArchitecture = "netstandard2.0"
let fsharpCompilerInteractiveSettingsArchitecture = "netstandard2.0"
+ let dotnetArchitecture = "net7.0"
#if NET472
let fscArchitecture = "net472"
let fsiArchitecture = "net472"
let peverifyArchitecture = "net472"
#else
- let fscArchitecture = "net7.0"
- let fsiArchitecture = "net7.0"
- let peverifyArchitecture = "net7.0"
+ let fscArchitecture = dotnetArchitecture
+ let fsiArchitecture = dotnetArchitecture
+ let peverifyArchitecture = dotnetArchitecture
#endif
let repoRoot = SCRIPT_ROOT ++ ".." ++ ".."
let artifactsPath = repoRoot ++ "artifacts"
@@ -350,7 +357,7 @@ let config configurationName envVars =
let FSC = requireArtifact ("fsc" ++ configurationName ++ fscArchitecture ++ "fsc.dll")
#endif
let FSCOREDLLPATH = requireArtifact ("FSharp.Core" ++ configurationName ++ fsharpCoreArchitecture ++ "FSharp.Core.dll")
-
+ let DOTNETFSCCOMPILERPATH = requireArtifact ("fsc" ++ configurationName ++ dotnetArchitecture ++ "fsc.dll")
let defaultPlatform =
match Is64BitOperatingSystem with
// | PlatformID.MacOSX, true -> "osx.10.10-x64"
@@ -372,6 +379,7 @@ let config configurationName envVars =
FSCANYCPU = FSCANYCPU
FSIANYCPU = FSIANYCPU
#endif
+ DOTNETFSCCOMPILERPATH = DOTNETFSCCOMPILERPATH
FSI_FOR_SCRIPTS = FSI_FOR_SCRIPTS
FSharpBuild = FSharpBuild
FSharpCompilerInteractiveSettings = FSharpCompilerInteractiveSettings
diff --git a/tests/FSharp.Test.Utilities/Utilities.fs b/tests/FSharp.Test.Utilities/Utilities.fs
index f74faf49fa9..96b8e352e5a 100644
--- a/tests/FSharp.Test.Utilities/Utilities.fs
+++ b/tests/FSharp.Test.Utilities/Utilities.fs
@@ -120,6 +120,7 @@ module Utilities =
$TARGETFRAMEWORKtruetrue
+ $DOTNETFSCCOMPILERPATH
@@ -170,6 +171,7 @@ let main argv = 0"""
let pathToTemp = Path.Combine(pathToArtifacts, "Temp")
let projectDirectory = Path.Combine(pathToTemp,Guid.NewGuid().ToString() + ".tmp")
let pathToFSharpCore = typeof.Assembly.Location
+ let dotNetFscCompilerPath = config.DOTNETFSCCOMPILERPATH
try
try
Directory.CreateDirectory(projectDirectory) |> ignore
@@ -179,9 +181,9 @@ let main argv = 0"""
let directoryBuildTargetsFileName = Path.Combine(projectDirectory, "Directory.Build.targets")
let frameworkReferencesFileName = Path.Combine(projectDirectory, "FrameworkReferences.txt")
#if NETCOREAPP
- File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net7.0").Replace("$FSHARPCORELOCATION", pathToFSharpCore))
+ File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net7.0").Replace("$FSHARPCORELOCATION", pathToFSharpCore).Replace("$DOTNETFSCCOMPILERPATH", dotNetFscCompilerPath))
#else
- File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net472").Replace("$FSHARPCORELOCATION", pathToFSharpCore))
+ File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net472").Replace("$FSHARPCORELOCATION", pathToFSharpCore).Replace("$DOTNETFSCCOMPILERPATH", dotNetFscCompilerPath))
#endif
File.WriteAllText(programFsFileName, programFs)
File.WriteAllText(directoryBuildPropsFileName, directoryBuildProps)
diff --git a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fs b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fs
index 7b2bcd451e1..104eb8e2166 100644
--- a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fs
+++ b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fs
@@ -8,8 +8,9 @@
//section='- OUTPUT FILES - ' ! option=doc kind=OptionString
//section='- OUTPUT FILES - ' ! option=keyfile kind=OptionString
//section='- OUTPUT FILES - ' ! option=platform kind=OptionString
-//section='- OUTPUT FILES - ' ! option=nooptimizationdata kind=OptionUnit
-//section='- OUTPUT FILES - ' ! option=nointerfacedata kind=OptionUnit
+//section='- OUTPUT FILES - ' ! option=compressmetadata kind=OptionUnit
+//section='- OUTPUT FILES - ' ! option=nooptimizationdata kind=OptionUnit
+//section='- OUTPUT FILES - ' ! option=nointerfacedata kind=OptionUnit
//section='- OUTPUT FILES - ' ! option=sig kind=OptionString
//section='- INPUT FILES - ' ! option=reference kind=OptionString
//section='- RESOURCES - ' ! option=win32res kind=OptionString
diff --git a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx
index 2f22ee0d2a0..45ec1d3da2a 100644
--- a/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx
+++ b/tests/fsharpqa/Source/CompilerOptions/fsc/dumpAllCommandLineOptions/dummy.fsx
@@ -109,6 +109,7 @@
//section='- OUTPUT FILES - ' ! option=doc kind=OptionString
//section='- OUTPUT FILES - ' ! option=keyfile kind=OptionString
//section='- OUTPUT FILES - ' ! option=platform kind=OptionString
+//section='- OUTPUT FILES - ' ! option=compressmetadata kind=OptionUnit
//section='- OUTPUT FILES - ' ! option=nooptimizationdata kind=OptionUnit
//section='- OUTPUT FILES - ' ! option=nointerfacedata kind=OptionUnit
//section='- OUTPUT FILES - ' ! option=sig kind=OptionString
diff --git a/tests/fsharpqa/Source/CompilerOptions/fsc/help/help40.437.1033.bsl b/tests/fsharpqa/Source/CompilerOptions/fsc/help/help40.437.1033.bsl
index 885f49a5c64..779ea3c45a3 100644
--- a/tests/fsharpqa/Source/CompilerOptions/fsc/help/help40.437.1033.bsl
+++ b/tests/fsharpqa/Source/CompilerOptions/fsc/help/help40.437.1033.bsl
@@ -24,6 +24,8 @@ Copyright (c) Microsoft Corporation. All Rights Reserved.
run on: x86, x64, Arm, Arm64,
Itanium, anycpu32bitpreferred, or
anycpu. The default is anycpu.
+--compressmetadata[+|-] Compress interface and optimization
+ data files
--nooptimizationdata Only include optimization
information essential for
implementing inlined constructs.