提交 4fcfb8b6 编写于 作者: D Don Syme 提交者: Kevin Ransom (msft)

Make FSharp.Core a normal component (makes optdata/sigdata files unnecessary...

Make FSharp.Core a normal component (makes optdata/sigdata files unnecessary when recent compiler and FSharp.Core can be assumed) (#2884)

* merge optdata/sigdata

* merge optdata/sigdata (compat)

* merge optdata/sigdata (compat)

* merge optdata/sigdata (compat)

* fix build
上级 0d150322
......@@ -43,6 +43,15 @@
<File Id="Compiler_Redist_FSharp.Core.dll" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.dll" KeyPath="yes">
<NetFx:NativeImage Id="Compiler_Redist_FSharp.Core.Native.dll" Priority="0" Dependencies="no" Platform="all" AssemblyApplication="Compiler_Redist_fsc.exe" />
</File>
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files. For consistency we also continue to produce the files -->
<!-- for FSharp.Core 4.4.1.0, and include them in the redist. -->
<!-- -->
<!-- We should continue to produce the files for FSharp.Core 4.4.2.0 and beyond, for inclusion in the FSharp.Core -->
<!-- nuget package. We should do this for as long as it is possible that old F# compilers (VS2010-VS2017) will end up referring to newer -->
<!-- versions of the FSharp.Core package (which can happen automatically on package upgrade). However for FSharp.Core 4.4.2.0 -->
<!-- beyond the files will not be needed in the redist, which is only ever installed on machines alongside a recent -->
<!-- F# compiler -->
<File Id="FSharp_Core_Sigdata_File" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.sigdata" />
<File Id="FSharp_Core_Optdata_File" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.optdata" />
</Component>
......
......@@ -38,6 +38,15 @@
<Component Id="Runtime_Redist_4.4.1.0_FSharp.Core" Transitive="yes" Guid="$(fsharp.guid(Runtime_Redist_4.4.1.0_FSharp.Core, $(var.LocaleCode)))">
<File Id="Runtime_Redist_4.4.1.0_FSharp.Core.dll" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_4.4.1.0_FSharp.Core.xml" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files. For consistency we also continue to produce the files -->
<!-- for FSharp.Core 4.4.1.0, and include them in the redist. -->
<!-- -->
<!-- We should continue to produce the files for FSharp.Core 4.4.2.0 and beyond, for inclusion in the FSharp.Core -->
<!-- nuget package. We should do this for as long as it is possible that old F# compilers (VS2010-VS2017) will end up referring to newer -->
<!-- versions of the FSharp.Core package (which can happen automatically on package upgrade). However for FSharp.Core 4.4.2.0 -->
<!-- beyond the files will not be needed in the redist, which is only ever installed on machines alongside a recent -->
<!-- F# compiler -->
<File Id="Runtime_Redist_4.4.1.0_FSharp.Core.sigdata" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_4.4.1.0_FSharp.Core.optdata" Source="$(var.BinariesDir)\net40\bin\FSharp.Core.optdata" />
</Component>
......@@ -46,6 +55,7 @@
<Component Id="Runtime_Redist_3.47.41.0_FSharp.Core" Transitive="yes" Guid="$(fsharp.guid(Runtime_Redist_3.47.41.0_FSharp.Core, $(var.LocaleCode)))">
<File Id="Runtime_Redist_3.47.41.0_FSharp.Core.dll" Source="$(var.BinariesDir)\portable47\bin\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.47.41.0_FSharp.Core.xml" Source="$(var.BinariesDir)\portable47\bin\FSharp.Core.xml" />
<!-- See notes above on signdata/optdata and why they are still included here. -->
<File Id="Runtime_Redist_3.47.41.0_FSharp.Core.sigdata" Source="$(var.BinariesDir)\portable47\bin\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.47.41.0_FSharp.Core.optdata" Source="$(var.BinariesDir)\portable47\bin\FSharp.Core.optdata" />
</Component>
......@@ -54,6 +64,7 @@
<Component Id="Runtime_Redist_3.7.41.0_FSharp.Core" Transitive="yes" Guid="$(fsharp.guid(Runtime_Redist_3.7.41.0_FSharp.Core, $(var.LocaleCode)))">
<File Id="Runtime_Redist_3.7.41.0_FSharp.Core.dll" Source="$(var.BinariesDir)\portable7\bin\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.7.41.0_FSharp.Core.xml" Source="$(var.BinariesDir)\portable7\bin\FSharp.Core.xml" />
<!-- See notes above on signdata/optdata and why they are still included here. -->
<File Id="Runtime_Redist_3.7.41.0_FSharp.Core.sigdata" Source="$(var.BinariesDir)\portable7\bin\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.7.41.0_FSharp.Core.optdata" Source="$(var.BinariesDir)\portable7\bin\FSharp.Core.optdata" />
</Component>
......@@ -62,6 +73,7 @@
<Component Id="Runtime_Redist_3.78.41.0_FSharp.Core" Transitive="yes" Guid="$(fsharp.guid(Runtime_Redist_3.78.41.0_FSharp.Core, $(var.LocaleCode)))">
<File Id="Runtime_Redist_3.78.41.0_FSharp.Core.dll" Source="$(var.BinariesDir)\portable78\bin\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.78.41.0_FSharp.Core.xml" Source="$(var.BinariesDir)\portable78\bin\FSharp.Core.xml" />
<!-- See notes above on signdata/optdata and why they are still included here. -->
<File Id="Runtime_Redist_3.78.41.0_FSharp.Core.sigdata" Source="$(var.BinariesDir)\portable78\bin\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.78.41.0_FSharp.Core.optdata" Source="$(var.BinariesDir)\portable78\bin\FSharp.Core.optdata" />
</Component>
......@@ -70,6 +82,7 @@
<Component Id="Runtime_Redist_3.259.41.0_FSharp.Core" Transitive="yes" Guid="$(fsharp.guid(Runtime_Redist_3.259.41.0_FSharp.Core, $(var.LocaleCode)))">
<File Id="Runtime_Redist_3.259.41.0_FSharp.Core.dll" Source="$(var.BinariesDir)\portable259\bin\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.259.41.0_FSharp.Core.xml" Source="$(var.BinariesDir)\portable259\bin\FSharp.Core.xml" />
<!-- See notes above on signdata/optdata and why they are still included here. -->
<File Id="Runtime_Redist_3.259.41.0_FSharp.Core.sigdata" Source="$(var.BinariesDir)\portable259\bin\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.259.41.0_FSharp.Core.optdata" Source="$(var.BinariesDir)\portable259\bin\FSharp.Core.optdata" />
</Component>
......@@ -81,6 +94,8 @@
<Component Id="Runtime_Redist_4.4.0.0_FSharp.Core" Transitive="yes" Guid="DA07D2FE-8B67-566A-A48C-88AB3188BBCA">
<File Id="Runtime_Redist_4.4.0.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_4.4.0.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_4.4.0.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_4.4.0.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.optdata" />
</Component>
......@@ -89,6 +104,8 @@
<Component Id="Runtime_Redist_3.47.4.0_FSharp.Core" Transitive="yes" Guid="37873912-7DAC-5992-9FEA-92CF91857AA8">
<File Id="Runtime_Redist_3.47.4.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.47.4.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.47.4.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.47.4.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.optdata" />
</Component>
......@@ -97,6 +114,8 @@
<Component Id="Runtime_Redist_3.7.4.0_FSharp.Core" Transitive="yes" Guid="1574403D-39A7-5946-A982-AF82AAC8D7EB">
<File Id="Runtime_Redist_3.7.4.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.7.4.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.7.4.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.7.4.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.optdata" />
</Component>
......@@ -105,6 +124,8 @@
<Component Id="Runtime_Redist_3.78.4.0_FSharp.Core" Transitive="yes" Guid="38863225-7332-5676-B315-D075D92EE7B3">
<File Id="Runtime_Redist_3.78.4.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.78.4.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.78.4.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.78.4.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.optdata" />
</Component>
......@@ -113,6 +134,8 @@
<Component Id="Runtime_Redist_3.259.4.0_FSharp.Core" Transitive="yes" Guid="DCD97222-B0CF-5CA6-AFED-E12CA45E3A50">
<File Id="Runtime_Redist_3.259.4.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.259.4.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.259.4.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.259.4.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.optdata" />
</Component>
......@@ -124,6 +147,8 @@
<Component Id="Runtime_Redist_4.3.1.0_FSharp.Core" Transitive="yes" Guid="4A1993AA-FA5A-45E5-A08C-7A1887DA52B9">
<File Id="Runtime_Redist_4.3.1.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_4.3.1.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_4.3.1.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_4.3.1.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.optdata" />
</Component>
......@@ -132,6 +157,8 @@
<Component Id="Runtime_Redist_2.3.5.1_FSharp.Core" Transitive="yes" Guid="32033C8F-1065-453D-B97F-382FA8E47711">
<File Id="Runtime_Redist_2.3.5.1_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_2.3.5.1_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_2.3.5.1_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_2.3.5.1_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.optdata" />
</Component>
......@@ -140,6 +167,8 @@
<Component Id="Runtime_Redist_3.3.1.0_FSharp.Core" Transitive="yes" Guid="66247184-2DBA-45FC-8F6C-620DB406D01E">
<File Id="Runtime_Redist_3.3.1.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.3.1.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.3.1.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.3.1.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.optdata" />
</Component>
......@@ -148,6 +177,8 @@
<Component Id="Runtime_Redist_3.78.3.1_FSharp.Core" Transitive="yes" Guid="4E980E06-B1D8-4CE1-AA06-8BECA0CE042F">
<File Id="Runtime_Redist_3.78.3.1_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.78.3.1_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.78.3.1_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.78.3.1_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.optdata" />
</Component>
......@@ -156,6 +187,8 @@
<Component Id="Runtime_Redist_3.259.3.1_FSharp.Core" Transitive="yes" Guid="F0C04DA6-86D2-49DF-9348-E8A69B95EA70">
<File Id="Runtime_Redist_3.259.3.1_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_3.259.3.1_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_3.259.3.1_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_3.259.3.1_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.optdata" />
</Component>
......@@ -167,6 +200,8 @@
<Component Id="Runtime_Redist_4.3.0.0_FSharp.Core" Transitive="yes" Guid="A0608A0C-5B4A-439E-B058-5930433BF254">
<File Id="Runtime_Redist_4.3.0.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_4.3.0.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_4.3.0.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_4.3.0.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.optdata" />
</Component>
......@@ -175,6 +210,8 @@
<Component Id="Runtime_Redist_2.3.5.0_FSharp.Core" Transitive="yes" Guid="AFE254E7-FC12-4F7D-A804-9DF009BFBD8E">
<File Id="Runtime_Redist_2.3.5.0_FSharp.Core.dll" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.dll" KeyPath="yes" />
<File Id="Runtime_Redist_2.3.5.0_FSharp.Core.xml" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.xml" />
<!-- NOTE: The optdata and sigdata files are now integrated as resources for more recent FSharp.Core.dll's. -->
<!-- However old versions of FSharp.Core still need these files, which is why they are included here - and always shoul be. -->
<File Id="Runtime_Redist_2.3.5.0_FSharp.Core.sigdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.sigdata" />
<File Id="Runtime_Redist_2.3.5.0_FSharp.Core.optdata" Source="$(var.NugetPackagesDir)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.optdata" />
</Component>
......
......@@ -3583,11 +3583,29 @@ type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : Unres
// Typecheck and optimization environments on disk
//--------------------------------------------------------------------------
let IsSignatureDataResource (r: ILResource) = String.hasPrefix r.Name FSharpSignatureDataResourceName
let IsOptimizationDataResource (r: ILResource) = String.hasPrefix r.Name FSharpOptimizationDataResourceName
let GetSignatureDataResourceName (r: ILResource) = String.dropPrefix (String.dropPrefix r.Name FSharpSignatureDataResourceName) "."
let GetOptimizationDataResourceName (r: ILResource) = String.dropPrefix (String.dropPrefix r.Name FSharpOptimizationDataResourceName) "."
let IsReflectedDefinitionsResource (r: ILResource) = String.hasPrefix r.Name QuotationPickler.SerializedReflectedDefinitionsResourceNameBase
let IsSignatureDataResource (r: ILResource) =
r.Name.StartsWith FSharpSignatureDataResourceName ||
r.Name.StartsWith FSharpSignatureDataResourceName2
let IsOptimizationDataResource (r: ILResource) =
r.Name.StartsWith FSharpOptimizationDataResourceName ||
r.Name.StartsWith FSharpOptimizationDataResourceName2
let GetSignatureDataResourceName (r: ILResource) =
if r.Name.StartsWith FSharpSignatureDataResourceName then
String.dropPrefix r.Name FSharpSignatureDataResourceName
elif r.Name.StartsWith FSharpSignatureDataResourceName2 then
String.dropPrefix r.Name FSharpSignatureDataResourceName2
else failwith "GetSignatureDataResourceName"
let GetOptimizationDataResourceName (r: ILResource) =
if r.Name.StartsWith FSharpOptimizationDataResourceName then
String.dropPrefix r.Name FSharpOptimizationDataResourceName
elif r.Name.StartsWith FSharpOptimizationDataResourceName2 then
String.dropPrefix r.Name FSharpOptimizationDataResourceName2
else failwith "GetOptimizationDataResourceName"
let IsReflectedDefinitionsResource (r: ILResource) = r.Name.StartsWith QuotationPickler.SerializedReflectedDefinitionsResourceNameBase
type ILResource with
/// Get a function to read the bytes from a resource local to an assembly
......@@ -3611,10 +3629,13 @@ let PickleToResource file g scope rname p x =
let GetSignatureData (file, ilScopeRef, ilModule, byteReader) : PickledDataWithReferences<PickledCcuInfo> =
unpickleObjWithDanglingCcus file ilScopeRef ilModule unpickleCcuInfo byteReader
let WriteSignatureData (tcConfig:TcConfig,tcGlobals,exportRemapping,ccu:CcuThunk,file) : ILResource =
let WriteSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, ccu: CcuThunk, file) : ILResource =
let mspec = ccu.Contents
let mspec = ApplyExportRemappingToEntity tcGlobals exportRemapping mspec
PickleToResource file tcGlobals ccu (FSharpSignatureDataResourceName+"."+ccu.AssemblyName) pickleCcuInfo
// 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 else FSharpSignatureDataResourceName
PickleToResource file tcGlobals ccu (rname+ccu.AssemblyName) pickleCcuInfo
{ mspec=mspec
compileTimeWorkingDir=tcConfig.implicitIncludeDir
usesQuotations = ccu.UsesFSharp20PlusQuotations }
......@@ -3622,8 +3643,11 @@ let WriteSignatureData (tcConfig:TcConfig,tcGlobals,exportRemapping,ccu:CcuThunk
let GetOptimizationData (file, ilScopeRef, ilModule, byteReader) =
unpickleObjWithDanglingCcus file ilScopeRef ilModule Optimizer.u_CcuOptimizationInfo (byteReader())
let WriteOptimizationData (tcGlobals, file, ccu,modulInfo) =
PickleToResource file tcGlobals ccu (FSharpOptimizationDataResourceName+"."+ccu.AssemblyName) Optimizer.p_CcuOptimizationInfo modulInfo
let WriteOptimizationData (tcGlobals, file, 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 else FSharpOptimizationDataResourceName
PickleToResource file tcGlobals ccu (rname+ccu.AssemblyName) Optimizer.p_CcuOptimizationInfo modulInfo
//----------------------------------------------------------------------------
// Abstraction for project reference
......@@ -3644,10 +3668,8 @@ type RawFSharpAssemblyDataBackedByFileOnDisk (ilModule: ILModuleDef, ilAssemblyR
yield (ccuName, byteReader()) ]
let sigDataReaders =
if List.contains ilShortAssemName externalSigAndOptData then
if sigDataReaders.IsEmpty && List.contains ilShortAssemName externalSigAndOptData then
let sigFileName = Path.ChangeExtension(filename, "sigdata")
if not sigDataReaders.IsEmpty then
error(Error(FSComp.SR.buildDidNotExpectSigdataResource(FileSystem.GetFullPathShim filename),m))
if not (FileSystem.SafeExists sigFileName) then
error(Error(FSComp.SR.buildExpectedSigdataFile (FileSystem.GetFullPathShim sigFileName), m))
[ (ilShortAssemName, FileSystem.ReadAllBytesShim sigFileName)]
......@@ -3661,10 +3683,8 @@ type RawFSharpAssemblyDataBackedByFileOnDisk (ilModule: ILModuleDef, ilAssemblyR
// Look for optimization data in a file
let optDataReaders =
if List.contains ilShortAssemName externalSigAndOptData then
if optDataReaders.IsEmpty && List.contains ilShortAssemName externalSigAndOptData then
let optDataFile = Path.ChangeExtension(filename, "optdata")
if not optDataReaders.IsEmpty then
error(Error(FSComp.SR.buildDidNotExpectOptDataResource(FileSystem.GetFullPathShim filename),m))
if not (FileSystem.SafeExists optDataFile) then
error(Error(FSComp.SR.buildExpectedFileAlongSideFSharpCore(optDataFile,FileSystem.GetFullPathShim optDataFile),m))
[ (ilShortAssemName, (fun () -> FileSystem.ReadAllBytesShim optDataFile))]
......
......@@ -1072,10 +1072,8 @@ lexIndentOffForML,"Consider using a file with extension '.ml' or '.mli' instead"
1220,chkNoReflectedDefinitionOnStructMember,"ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter"
1221,tcDllImportNotAllowed,"DLLImport bindings must be static members in a class or function definitions in a module"
1222,buildExplicitCoreLibRequiresNoFramework,"When mscorlib.dll or FSharp.Core.dll is explicitly referenced the %s option must also be passed"
1223,buildExpectedSigdataFile,"FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s."
1224,buildDidNotExpectOptDataResource,"Did not expect to find optdata resource in FSharp.Core.dll at %s."
1225,buildExpectedFileAlongSideFSharpCore,"File '%s' not found alongside FSharp.Core. File expected in %s."
1226,buildDidNotExpectSigdataResource,"Did not expect to find sigdata resource in FSharp.Core.dll at %s."
1223,buildExpectedSigdataFile,"FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required."
1225,buildExpectedFileAlongSideFSharpCore,"File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required."
1227,buildUnexpectedFileNameCharacter,"Filename '%s' contains invalid character '%s'"
1228,tcInvalidUseBangBinding,"'use!' bindings must be of the form 'use! <var> = <expr>'"
1230,crefNoInnerGenericsInQuotations,"Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic."
......
......@@ -267,6 +267,9 @@
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
<!-- Hook compilation phase to do custom work -->
<!-- NOTE: The optdata and sigdata files are no longer needed by the F# compiler (the information is -->
<!-- integrated as resources into more recent FSharp.Core.dll's. However they are still produced to -->
<!-- allow older versions of the F# compiler to reference more recent FSharp.Core packages -->
<Target Name="CopyToBuiltBin" BeforeTargets="AfterCompile" AfterTargets="CoreCompile" >
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Include="$(IntermediateOutputPath)\FSharp.Core.sigdata" />
......
......@@ -43,14 +43,7 @@
</metadata>
<files>
<file src="FSharp.Core.dll" target="lib/netstandard1.6" />
<file src="FSharp.Core.sigdata" target="lib/netstandard1.6" />
<file src="FSharp.Core.optdata" target="lib/netstandard1.6" />
<file src="FSharp.Core.xml" target="lib/netstandard1.6" />
<file src="FSharp.Core.runtimeconfig.json" target="lib/netstandard1.6" />
<file src="FSharp.Core.sigdata" target="content/any/netstandard1.6" />
<file src="FSharp.Core.optdata" target="content/any/netstandard1.6" />
<file src="FSharp.Core.sigdata" target="runtimes/any/native/" />
<file src="FSharp.Core.optdata" target="runtimes/any/native/" />
<file src="FSharp.Core.xml" target="runtimes/any/native/" />
</files>
</package>
......@@ -444,21 +444,18 @@ let outpath outfile extn =
//----------------------------------------------------------------------------
let GenerateInterfaceData(tcConfig:TcConfig) =
(* (tcConfig.target = Dll || tcConfig.target = Module) && *)
not tcConfig.standalone && not tcConfig.noSignatureData
let EncodeInterfaceData(tcConfig:TcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, isIncrementalBuild) =
let EncodeInterfaceData(tcConfig: TcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, isIncrementalBuild) =
if GenerateInterfaceData(tcConfig) then
let resource = WriteSignatureData (tcConfig, tcGlobals, exportRemapping, generatedCcu, outfile)
// The resource gets written to a file for FSharp.Core
let useDataFiles = (tcConfig.useOptimizationDataFile || tcGlobals.compilingFslib) && not isIncrementalBuild
if useDataFiles then
let sigDataFileName = (Filename.chopExtension outfile)+".sigdata"
File.WriteAllBytes(sigDataFileName, resource.Bytes)
let resources =
if useDataFiles then
let sigDataFileName = (Filename.chopExtension outfile)+".sigdata"
File.WriteAllBytes(sigDataFileName, resource.Bytes)
[]
else
[ resource ]
[ resource ]
let sigAttr = mkSignatureDataVersionAttr tcGlobals (IL.parseILVersion Internal.Utilities.FSharpEnvironment.FSharpBinaryMetadataFormatRevision)
[sigAttr], resources
else
......@@ -470,28 +467,24 @@ let EncodeInterfaceData(tcConfig:TcConfig, tcGlobals, exportRemapping, generated
//----------------------------------------------------------------------------
let GenerateOptimizationData(tcConfig) =
(* (tcConfig.target =Dll || tcConfig.target = Module) && *)
GenerateInterfaceData(tcConfig)
let EncodeOptimizationData(tcGlobals, tcConfig, outfile, exportRemapping, data) =
let EncodeOptimizationData(tcGlobals, tcConfig: TcConfig, outfile, exportRemapping, data, isIncrementalBuild) =
if GenerateOptimizationData tcConfig then
let data = map2Of2 (Optimizer.RemapOptimizationInfo tcGlobals exportRemapping) data
if verbose then dprintn "Generating optimization data attribute..."
// REVIEW: need a better test for this
if tcConfig.useOptimizationDataFile || tcGlobals.compilingFslib then
// As with the sigdata file, the optdata gets written to a file for FSharp.Core
let useDataFiles = (tcConfig.useOptimizationDataFile || tcGlobals.compilingFslib) && not isIncrementalBuild
if useDataFiles then
let ccu, modulInfo = data
let bytes = TastPickle.pickleObjWithDanglingCcus outfile tcGlobals ccu Optimizer.p_CcuOptimizationInfo modulInfo
let optDataFileName = (Filename.chopExtension outfile)+".optdata"
File.WriteAllBytes(optDataFileName, bytes)
// As with the sigdata file, the optdata gets written to a file for FSharp.Core
if tcGlobals.compilingFslib then
[]
else
let (ccu, optData) =
if tcConfig.onlyEssentialOptimizationData || tcConfig.useOptimizationDataFile
then map2Of2 Optimizer.AbstractOptimizationInfoToEssentials data
else data
[ WriteOptimizationData (tcGlobals, outfile, ccu, optData) ]
let (ccu, optData) =
if tcConfig.onlyEssentialOptimizationData then
map2Of2 Optimizer.AbstractOptimizationInfoToEssentials data
else
data
[ WriteOptimizationData (tcGlobals, outfile, ccu, optData) ]
else
[ ]
......@@ -1884,7 +1877,7 @@ let main2a(Args (ctok, tcConfig, tcImports, frameworkTcImports: TcImports, tcGlo
// Encode the optimization data
ReportTime tcConfig ("Encoding OptData")
let optDataResources = EncodeOptimizationData(tcGlobals, tcConfig, outfile, exportRemapping, (generatedCcu, optimizationData))
let optDataResources = EncodeOptimizationData(tcGlobals, tcConfig, outfile, exportRemapping, (generatedCcu, optimizationData), false)
// Pass on only the minimum information required for the next phase
Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger, generatedCcu, outfile, optimizedImpls, topAttrs, pdbfile, assemblyName, (sigDataAttributes, sigDataResources), optDataResources, assemVerFromAttrib, signingInfo, metadataVersion, exiter)
......
......@@ -5078,7 +5078,12 @@ let CombineCcuContentFragments m l =
// Resource format for pickled data
//--------------------------------------------------------------------------
let FSharpOptimizationDataResourceName = "FSharpOptimizationData"
let FSharpSignatureDataResourceName = "FSharpSignatureData"
let FSharpOptimizationDataResourceName = "FSharpOptimizationData."
let FSharpSignatureDataResourceName = "FSharpSignatureData."
// 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."
let FSharpSignatureDataResourceName2 = "FSharpSignatureInfo."
......@@ -51,13 +51,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
<Target Name="CopyToBuiltBin" BeforeTargets="BuiltProjectOutputGroup" AfterTargets="CoreCompile" >
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Include="$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin\FSharp.Core.sigdata" />
<BuiltProjectOutputGroupKeyOutput Include="$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin\FSharp.Core.optdata" />
</ItemGroup>
<Copy SourceFiles="$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin\FSharp.Core.sigdata" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(FSharpSourcesRoot)\..\$(Configuration)\net40\bin\FSharp.Core.optdata" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
</Target>
</Project>
\ No newline at end of file
......@@ -21,8 +21,6 @@ try
let FSharpCoreDir = getDirectoryName FSharpCore
[ FSharpCoreDir ++ "fsc.exe"
FSharpCoreDir ++ "FSharp.Compiler.dll"
FSharpCoreDir ++ "FSharp.Core.sigdata"
FSharpCoreDir ++ "FSharp.Core.optdata"
FSharpCoreDir ++ "default.win32manifest"
FSharpCoreDir ++ "fsi.exe"
FSharpCoreDir ++ "FSharp.Compiler.Interactive.Settings.dll" ]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册