Merge remote-tracking branch 'upstream/master' into xliff

This commit is contained in:
Brett V. Forsgren 2017-12-01 13:02:34 -08:00
Родитель 9c911876a2 3f667b5f59
Коммит 8be369e102
196 изменённых файлов: 13773 добавлений и 1765 удалений

Просмотреть файл

@ -97,11 +97,8 @@ Install Xamarin Studio, then
To build and test Visual F# IDE Tools, install these requirements:
- [Visual Studio 2017](https://www.visualstudio.com/downloads/)
- Under the "Windows" workloads, select ".NET desktop development"
- Select "F# language support" under the optional components
- Select "F# desktop language support" under the optional components
- Under the "Other Toolsets" workloads, select "Visual Studio extension development"
- Under the "Individual components" tab select "Windows 10 SDK" as shown below (needed for compiling RC resource, see #2556): \
![image](https://cloud.githubusercontent.com/assets/1249087/23730261/5c78c850-041b-11e7-9d9d-62766351fd0f.png)
- Failing to install this will lead to error FS0193: Could not find file visualfsharp\vsintegration\src\FSharp.ProjectSystem.FSharp\obj\net40\ProjectResources.rc.res.
Steps to build:
@ -111,7 +108,6 @@ Steps to build:
Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools.
Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see https://github.com/Microsoft/visualfsharp/issues/2771 and https://github.com/Microsoft/visualfsharp/pull/2773.
Note: if you face this error [#2351](https://github.com/Microsoft/visualfsharp/issues/2351):
@ -125,7 +121,6 @@ Or hard crash on launch ("Unknown Error"), delete these folders:
#### [Optional] Install the Visual F# IDE Tools (Windows Only)
At time of writing, the Visual F# IDE Tools can only be installed into the latest Visual Studio 2017 RC releases.
The new builds of the Visual F# IDE Tools can no longer be installed into Visual Studio 2015.
You can install Visual Studio 2017 from https://www.visualstudio.com/downloads/.
@ -155,7 +150,6 @@ changes, but the root (default) hive will remain untouched. You can also start t
Because this uses the "RoslynDev" hive you can simultaneously test changes to an appropriate build of Roslyn binaries.
#### [Optional] Rapid deployment of incremental changes to Visual F# IDE Tools components
For the brave, you can rapidly deploy incrementally updated versions of Visual F# IDE Tool components such as ``FSHarp.Editor.dll`` by copying them directly into the extension directory in your user AppData folder:
@ -176,7 +170,6 @@ For **Release**:
vsintegration\update-vsintegration.cmd release
# Notes
#### Windows: Links to Additional frameworks
@ -192,10 +185,9 @@ For **Release**:
- [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx)
- [Windows 10 SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)
#### Notes on the Windows .NET Framework build
1. The `update.cmd` script adds required strong name validation skips, and NGens the compiler and libraries. This requires admin privileges.
1. The `update.cmd` script adds required strong name validation skips and NGens the compiler and libraries. This requires admin privileges.
1. The compiler binaries produced are "private" and strong-named signed with a test key.
1. Some additional tools are required to build the compiler, notably `fslex.exe`, `fsyacc.exe`, `FSharp.PowerPack.Build.Tasks.dll`, `FsSrGen.exe`, `FSharp.SRGen.Build.Tasks.dll`, and the other tools found in the `lkg` directory.
1. The overall bootstrapping process executes as follows
@ -217,4 +209,3 @@ Where you should set proper proxy address, user name and password.
#### Resources
The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.

Просмотреть файл

@ -1 +1 @@
2.0.0-preview2-006502
2.0.3-servicing-007056

Просмотреть файл

@ -10,19 +10,25 @@
<PropertyGroup>
<FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
<!-- This version should be kept in sync with `packages.config` -->
<FeedTasksPackageVersion>1.0.0-prerelease-02121-01</FeedTasksPackageVersion>
<FeedTasksPackageVersion>1.0.0-prerelease-02219-01</FeedTasksPackageVersion>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)packages\$(FeedTasksPackage).$(FeedTasksPackageVersion)\build\$(FeedTasksPackage).targets" />
<ItemGroup>
<ItemsToPush Include="$(MSBuildThisFileDirectory)artifacts\**\*.nupkg" />
<NuGetPackages Include="$(MSBuildThisFileDirectory)artifacts\**\*.nupkg" />
<OtherAssets Include="$(MSBuildThisFileDirectory)insertion\**" />
</ItemGroup>
<Target Name="Build">
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(ItemsToPush)"
ItemsToPush="@(NuGetPackages)"
Overwrite="$(PublishOverwrite)" />
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(OtherAssets)"
PublishFlatContainer="true"
Overwrite="$(PublishOverwrite)" />
</Target>

Просмотреть файл

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27005.2
VisualStudioVersion = 15.0.27116.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
EndProject
@ -96,14 +96,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleProject", "vsintegra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryProject", "vsintegration\ProjectTemplates\LibraryProject\LibraryProject.csproj", "{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCore78Project", "vsintegration\ProjectTemplates\NetCore78Project\NetCore78Project.csproj", "{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCore259Project", "vsintegration\ProjectTemplates\NetCore259Project\NetCore259Project.csproj", "{D9D95330-3626-4199-B7AF-17B8E4AF6D87}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCoreProject", "vsintegration\ProjectTemplates\NetCoreProject\NetCoreProject.csproj", "{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortableLibraryProject", "vsintegration\ProjectTemplates\PortableLibraryProject\PortableLibraryProject.csproj", "{DB374A0C-7560-479F-9B21-D37C81F7624F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TutorialProject", "vsintegration\ProjectTemplates\TutorialProject\TutorialProject.csproj", "{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ItemTemplates", "ItemTemplates", "{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}"
@ -146,6 +138,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceFile", "vsintegrati
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build.UnitTests", "src\fsharp\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj", "{B0689A4E-07D8-494D-A0C8-791CB1D74E54}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -564,54 +558,6 @@ Global
{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|Any CPU.Build.0 = Release|Any CPU
{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|x86.ActiveCfg = Release|Any CPU
{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|x86.Build.0 = Release|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Debug|x86.Build.0 = Debug|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Proto|Any CPU.Build.0 = Proto|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Proto|x86.ActiveCfg = Proto|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Proto|x86.Build.0 = Proto|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Release|Any CPU.Build.0 = Release|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Release|x86.ActiveCfg = Release|Any CPU
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210}.Release|x86.Build.0 = Release|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Debug|x86.ActiveCfg = Debug|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Debug|x86.Build.0 = Debug|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Proto|Any CPU.Build.0 = Proto|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Proto|x86.ActiveCfg = Proto|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Proto|x86.Build.0 = Proto|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Release|Any CPU.Build.0 = Release|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Release|x86.ActiveCfg = Release|Any CPU
{D9D95330-3626-4199-B7AF-17B8E4AF6D87}.Release|x86.Build.0 = Release|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Debug|x86.Build.0 = Debug|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Proto|Any CPU.Build.0 = Proto|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Proto|x86.ActiveCfg = Proto|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Proto|x86.Build.0 = Proto|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Release|Any CPU.Build.0 = Release|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Release|x86.ActiveCfg = Release|Any CPU
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5}.Release|x86.Build.0 = Release|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Debug|x86.ActiveCfg = Debug|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Debug|x86.Build.0 = Debug|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Proto|Any CPU.Build.0 = Proto|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Proto|x86.ActiveCfg = Proto|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Proto|x86.Build.0 = Proto|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Release|Any CPU.Build.0 = Release|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Release|x86.ActiveCfg = Release|Any CPU
{DB374A0C-7560-479F-9B21-D37C81F7624F}.Release|x86.Build.0 = Release|Any CPU
{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|x86.ActiveCfg = Debug|Any CPU
@ -816,6 +762,18 @@ Global
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.Build.0 = Release|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.ActiveCfg = Release|Any CPU
{400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.Build.0 = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.ActiveCfg = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.Build.0 = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.Build.0 = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.ActiveCfg = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.Build.0 = Debug|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.Build.0 = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.ActiveCfg = Release|Any CPU
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -858,10 +816,6 @@ Global
{F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{604F0DAA-2D33-48DD-B162-EDF0B672803D} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{01678CDA-A11F-4DEE-9344-2EDF91CF1AE7} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{1A8DBF70-4178-4AE3-AF5F-39DDD5692210} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{D9D95330-3626-4199-B7AF-17B8E4AF6D87} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{5B739CF3-1116-4EB4-B598-6C16BEA81CE5} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{DB374A0C-7560-479F-9B21-D37C81F7624F} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4} = {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}
{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
{6BA13AA4-C25F-480F-856B-8E8000299A72} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
@ -883,6 +837,7 @@ Global
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268}
{0385564F-07B4-4264-AB8A-17C393E9140C} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
{400FAB03-786E-40CC-85A8-04B0C2869B14} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{B0689A4E-07D8-494D-A0C8-791CB1D74E54} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37}

Просмотреть файл

@ -73,39 +73,54 @@
<ItemGroup Condition="'$(TEST_CORECLR_FSHARP_SUITE)'=='1'" >
<ProjectsWithCoreClr Include="tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj" />
<ProjectsWithCoreClr Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
<ProjectsToRestore Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TEST_NET40_FSHARPQA_SUITE)'=='1' OR '$(TEST_NET40_FSHARP_SUITE)'=='1'" >
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj" />
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj" />
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
<ProjectsToRestore Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TEST_VS_IDEUNIT_SUITE)'=='1'" >
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-unittests-build.proj"/>
</ItemGroup>
<PropertyGroup>
<CustomProps>AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</CustomProps>
</PropertyGroup>
<!-- +++++++++++++++++++++++ Targets +++++++++++++++++++++++++++++++ -->
<Target Name="Build">
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(NugetProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);" />
<MSBuild Projects="@(SetupProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(NugetProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);$(CustomProps)" />
<MSBuild Projects="@(SetupProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
</Target>
<Target Name="Rebuild">
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithNet40PlusDefine)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);FSHARP_SUITE_DRIVES_CORECLR_TESTS=true" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(NugetProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);" />
<MSBuild Projects="@(SetupProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(ProjectsWithNet40PlusDefine)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);FSHARP_SUITE_DRIVES_CORECLR_TESTS=true;$(CustomProps)" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(NugetProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);$(CustomProps)" />
<MSBuild Projects="@(SetupProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
</Target>
<Target Name="Clean">
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithNet40PlusDefine)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);FSHARP_SUITE_DRIVES_CORECLR_TESTS=true" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(NugetProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);" />
<MSBuild Projects="@(SetupProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
<MSBuild Projects="@(ProjectsWithNet40)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(ProjectsWithNet40PlusDefine)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetDotnetProfile=net40;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);FSHARP_SUITE_DRIVES_CORECLR_TESTS=true;$(CustomProps)" />
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetDotnetProfile=coreclr;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
<MSBuild Projects="@(NugetProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);$(CustomProps)" />
<MSBuild Projects="@(SetupProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN);$(CustomProps)" />
</Target>
<Target Name="Restore">
<MSBuild Projects="@(ProjectsToRestore)" Targets="Restore" />
</Target>
</Project>

Просмотреть файл

@ -22,7 +22,7 @@ echo ^<proto^|protofx^>
echo ^<ci^|ci_part1^|ci_part2^|ci_part3^|microbuild^|nuget^>
echo ^<debug^|release^>
echo ^<diag^|publicsign^>
echo ^<test^|test-net40-coreunit^|test-coreclr-coreunit^|test-compiler-unit^|test-net40-ideunit^|test-net40-fsharp^|test-coreclr-fsharp^|test-net40-fsharpqa^>
echo ^<test^|no-test^|test-net40-coreunit^|test-coreclr-coreunit^|test-compiler-unit^|test-net40-ideunit^|test-net40-fsharp^|test-coreclr-fsharp^|test-net40-fsharpqa^>
echo ^<include tag^>
echo ^<init^>
echo.
@ -82,6 +82,7 @@ REM ------------------ Parse all arguments -----------------------
set _autoselect=1
set _autoselect_tests=0
set no_test=0
set /a counter=0
for /l %%x in (1 1 9) do (
set /a counter=!counter!+1
@ -296,6 +297,10 @@ if /i "%ARG%" == "test" (
set _autoselect_tests=1
)
if /i "%ARG%" == "no-test" (
set no_test=1
)
if /i "%ARG%" == "include" (
set /a counter=!counter!+1
if "!INCLUDE_TEST_SPEC_NUNIT!" == "" ( set INCLUDE_TEST_SPEC_NUNIT=cat == %ARG2% ) else (set INCLUDE_TEST_SPEC_NUNIT=cat == %ARG2% or !INCLUDE_TEST_SPEC_NUNIT! )
@ -473,7 +478,7 @@ echo.
echo ---------------- Done with arguments, starting preparation -----------------
set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.0.26201
set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.1.192
if "%VSSDKInstall%"=="" (
set VSSDKInstall=%~dp0packages\%BuildToolsPackage%\tools\vssdk
)
@ -584,6 +589,15 @@ if "%RestorePackages%" == "true" (
%_nugetexe% restore setup\packages.config !_nugetoptions!
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
)
set restore_fsharp_suite=0
if "%TEST_NET40_FSHARP_SUITE%" == "1" set restore_fsharp_suite=1
if "%TEST_CORECLR_FSHARP_SUITE%" == "1" set restore_fsharp_suite=1
if "!restore_fsharp_suite!" == "1" (
%_nugetexe% restore tests\fsharp\packages.config !_nugetoptions!
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
)
)
if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" (
@ -650,8 +664,11 @@ if "%BUILD_PROTO%" == "1" (
echo ---------------- Done with proto, starting build ------------------------
if "%BUILD_PHASE%" == "1" (
echo %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
echo %_msbuildexe% %msbuildflags% build-everything.proj /t:Restore
%_msbuildexe% %msbuildflags% build-everything.proj /t:Restore
echo %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
@if ERRORLEVEL 1 echo Error build failed && goto :failure
)
@ -684,16 +701,6 @@ if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe
echo SDK environment vars from Registry
echo ==================================
::See https://stackoverflow.com/a/17113667/111575 on 2^>NUL for suppressing the error "ERROR: The system was unable to find the specified registry key or value." from reg.exe, this fixes #3619
FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.2\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
set PATH=%PATH%;%WINSDKNETFXTOOLS%
for /d %%i in (%WINDIR%\Microsoft.NET\Framework\v4.0.?????) do set CORDIR=%%i
set PATH=%PATH%;%CORDIR%
@ -701,7 +708,6 @@ set REGEXE32BIT=reg.exe
IF NOT DEFINED SNEXE32 IF EXIST "%WINSDKNETFXTOOLS%\sn.exe" set SNEXE32=%WINSDKNETFXTOOLS%sn.exe
IF NOT DEFINED SNEXE64 IF EXIST "%WINSDKNETFXTOOLS%x64\sn.exe" set SNEXE64=%WINSDKNETFXTOOLS%x64\sn.exe
IF NOT DEFINED ildasm IF EXIST "%WINSDKNETFXTOOLS%\ildasm.exe" set ildasm=%WINSDKNETFXTOOLS%ildasm.exe
echo.
echo SDK environment vars
@ -709,11 +715,12 @@ echo =======================
echo WINSDKNETFXTOOLS: %WINSDKNETFXTOOLS%
echo SNEXE32: %SNEXE32%
echo SNEXE64: %SNEXE64%
echo ILDASM: %ILDASM%
echo
if "%TEST_NET40_COMPILERUNIT_SUITE%" == "0" if "%TEST_NET40_COREUNIT_SUITE%" == "0" if "%TEST_CORECLR_COREUNIT_SUITE%" == "0" if "%TEST_VS_IDEUNIT_SUITE%" == "0" if "%TEST_NET40_FSHARP_SUITE%" == "0" if "%TEST_NET40_FSHARPQA_SUITE%" == "0" goto :success
if "%no_test%" == "1" goto :success
echo ---------------- Done with update, starting tests -----------------------
if NOT "%INCLUDE_TEST_SPEC_NUNIT%" == "" (
@ -908,7 +915,7 @@ if "%TEST_CORECLR_FSHARP_SUITE%" == "1" (
set OUTPUTFILE=
set ERRORFILE=
set XMLFILE=!RESULTSDIR!\test-coreclr-fsharp-results.xml
echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Tests.FSharpSuite.DrivingCoreCLR\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" !WHERE_ARG_NUNIT!
"%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Tests.FSharpSuite.DrivingCoreCLR\FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll" !WHERE_ARG_NUNIT!
if errorlevel 1 (

Просмотреть файл

@ -29,7 +29,7 @@ build.sh ^<all^|net40^|coreclr^|pcls^|vs^>
^<ci^|ci_part1^|ci_part2^|ci_part3^|microbuild^>
^<debug^|release^>
^<diag^|publicsign^>
^<test^|test-net40-coreunit^|test-coreclr-coreunit^|test-compiler-unit^|test-pcl-coreunit^|test-net40-fsharp^|test-coreclr-fsharp^|test-net40-fsharpqa^>
^<test^|no-test^|test-net40-coreunit^|test-coreclr-coreunit^|test-compiler-unit^|test-pcl-coreunit^|test-net40-fsharp^|test-coreclr-fsharp^|test-net40-fsharpqa^>
^<include tag^>
^<init^>
@ -104,6 +104,7 @@ export INCLUDE_TEST_TAGS=
# Set up variables used to determine whether we'll automatically select which
# targets to build/run/test. NOTE: These aren't exported, they're only used by this script.
no_test=0
_autoselect=1
_autoselect_tests=0
@ -250,6 +251,9 @@ do
"test")
_autoselect_tests=1
;;
"no-test")
no_test=1
;;
"include")
failwith "The 'include' option is not (yet) supported by this script."
#export /a counter=!counter!+1
@ -559,6 +563,11 @@ if [ "$TEST_NET40_COMPILERUNIT_SUITE" = '0' ] && [ "$TEST_PORTABLE_COREUNIT_SUIT
exit 0
fi
if [ $no_test -eq 1 ]; then
# Successful build; not running tests so exit now.
exit 0
fi
build_status "Done with update, starting tests"
if [ -n "$INCLUDE_TEST_SPEC_NUNIT" ]; then

Просмотреть файл

@ -17,7 +17,6 @@
<TargetType>LIBRARY</TargetType>
<NoWarn>58;75</NoWarn>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<ResolveNuGetPackages>false</ResolveNuGetPackages>
<OutputPath>..\..\$(Configuration)\fcs\net45\</OutputPath>
<Tailcalls>true</Tailcalls>
@ -71,6 +70,9 @@
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\ProjectOptionsTests.fs">
<Link>ProjectOptionsTests.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\StructureTests.fs">
<Link>StructureTests.fs</Link>
</Compile>
<None Include="$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.optdata">
<Link>FSharp.Core.optdata</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

Просмотреть файл

@ -13,6 +13,7 @@
<DefineConstants>$(DefineConstants);COMPILER_SERVICE</DefineConstants>
<DefineConstants>$(DefineConstants);COMPILER_SERVICE_ASSUMES_FSHARP_CORE_4_4_0_0</DefineConstants>
<DefineConstants>$(DefineConstants);EXTENSIBLE_DUMPER</DefineConstants>
<DefineConstants>$(DefineConstants);NO_EXTENSIONTYPING</DefineConstants>
<DefineConstants>$(DefineConstants);FSHARP_CORE_4_5</DefineConstants>
<DefineConstants>$(DefineConstants);FX_PORTABLE_OR_NETSTANDARD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_ATLEAST_PORTABLE</DefineConstants>
@ -62,7 +63,6 @@
<DefineConstants>$(DefineConstants);NO_LOGGING_GUI</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_MSBUILD</DefineConstants>
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
<DefineConstants>$(DefineConstants);STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY</DefineConstants>
<DefineConstants>$(DefineConstants);TODO_REWORK_ASSEMBLY_LOAD</DefineConstants>
<DefineConstants>$(DefineConstants);TODO_REWORK_SERVER</DefineConstants>
<NoWarn>$(NoWarn);44;69;65;54;61;75;62;9;2003;</NoWarn>
@ -652,7 +652,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="1.3.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />

Просмотреть файл

@ -24,7 +24,6 @@
<!-- We target .NET 4.5 for FSharp.Compiler.Service.dll to allow broader use of this DLL -->
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<DefineConstants>$(DefineConstants);EXTENSIONTYPING</DefineConstants>
<DefineConstants>$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
@ -635,7 +634,7 @@
<Reference Include="System.Numerics" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>

Просмотреть файл

@ -9,5 +9,8 @@
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>
<SystemCollectionsImmutableVersion>1.3.1</SystemCollectionsImmutableVersion>
<AssemblySearchPaths>{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</AssemblySearchPaths>
</PropertyGroup>
</Project>

Просмотреть файл

@ -15,7 +15,6 @@
<NoWarn>$(NoWarn);62;44</NoWarn>
<AssemblyName>FscExe</AssemblyName>
<Name>FscExe</Name>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
<DefineConstants>FX_RESIDENT_COMPILER;$(DefineConstants)</DefineConstants>
<AllowCrossTargeting>true</AllowCrossTargeting>

Просмотреть файл

@ -26,6 +26,12 @@ if [%1]==[force] (
if exist "%PACKAGES_DIR%microsoft.dotnet.buildtools" rmdir /S /Q "%PACKAGES_DIR%microsoft.dotnet.buildtools"
)
set /p DOTNET_TOOLS_VERSION=< "%~dp0DotnetCLIToolsVersion.txt"
if not exist "%DOTNET_TOOLS_PATH%\sdk\%DOTNET_TOOLS_VERSION%" (
:: dotnet cli doesn't yet exist, delete the semaphore
del "%BUILD_TOOLS_SEMAPHORE%" >NUL 2>&1
)
:: If sempahore exists do nothing
if exist "%BUILD_TOOLS_SEMAPHORE%" (
echo Tools are already initialized.
@ -44,7 +50,6 @@ if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
echo Running %0 > "%INIT_TOOLS_LOG%"
set /p DOTNET_TOOLS_VERSION=< "%~dp0DotnetCLIToolsVersion.txt"
if exist "%DOTNET_TOOLS_PATH%" goto :afterdotnettoolsrestore
echo Installing dotnet OLD VERSION OF THE cli...

Просмотреть файл

@ -103,14 +103,14 @@ ${buildPath}build.cmd ${buildFlavor} ${build_args}""")
Utilities.setMachineAffinity(newJob, os, affinity)
Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}")
if (build_args != "none") {
Utilities.addArchival(newJob, "tests/TestResults/*.*", "", skipIfNoTestFiles, false)
if (configuration == "Release_fcs") {
Utilities.addArchival(newJob, "Release/fcs/**")
}
else {
Utilities.addArchival(newJob, "${buildFlavor}/**")
}
if (build_args != "none") {
Utilities.addArchival(newJob, "tests/TestResults/*.*", "", skipIfNoTestFiles, false)
if (configuration == "Release_fcs") {
Utilities.addArchival(newJob, "Release/**")
}
else {
Utilities.addArchival(newJob, "${buildFlavor}/**")
}
}
if (isPullRequest) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build")

Просмотреть файл

@ -12,12 +12,12 @@
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
<!-- For the internal orchestrated build. This version should be kept in sync with `PublishToBlob.proj` -->
<package id="Microsoft.DotNet.Build.Tasks.Feed" version="1.0.0-prerelease-02121-01" />
<package id="Microsoft.DotNet.Build.Tasks.Feed" version="1.0.0-prerelease-02219-01" />
<!-- Actual dependencies of FSharp.Compiler.dll and FSharp.Core.dll -->
<package id="System.Collections.Immutable" version="1.3.1" />
<package id="System.Reflection.Metadata" version="1.4.2" />
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.2.0" />
<package id="Microsoft.DiaSymReader" version="1.1.0" />
<package id="System.ValueTuple" version="4.3.1" />
<package id="Microsoft.VisualFSharp.Msbuild.15.0" version="1.0.1" />
@ -32,7 +32,7 @@
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.8"/>
<package id="Newtonsoft.Json" version="8.0.1"/>
<package id="Microsoft.FSharp.TupleSample" version="1.0.0-alpha-161121"/>
<package id="Microsoft.VSSDK.BuildTools" version="15.0.26201" />
<package id="Microsoft.VSSDK.BuildTools" version="15.1.192" />
<!-- Annoyingly the build of FSharp.Compiler.Server.Shared references a Visual Studio-specific attribute -->
<!-- That DLL is logically part of the F# Compiler and F# Interactive but is shipped as part of the Visual F# IDE Tools -->

Просмотреть файл

@ -179,7 +179,7 @@
</Component>
<Component Id="Compiler_Redist_Microsoft.DiaSymReader.PortablePdb.dll" Guid="$(fsharp.guid(Compiler_Redist_Microsoft.DiaSymReader.PortablePdb.dll, $(var.LocaleCode)))">
<File Id="Compiler_Redist_Microsoft.DiaSymReader.PortablePdb.dll" Source="$(var.NugetPackagesDir)\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\netstandard1.1\Microsoft.DiaSymReader.PortablePdb.dll" />
<File Id="Compiler_Redist_Microsoft.DiaSymReader.PortablePdb.dll" Source="$(var.NugetPackagesDir)\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\netstandard1.1\Microsoft.DiaSymReader.PortablePdb.dll" />
</Component>
<Component Id="Compiler_Redist_Microsoft.DiaSymReader.dll" Guid="$(fsharp.guid(Compiler_Redist_Microsoft.DiaSymReader.dll, $(var.LocaleCode)))">

Просмотреть файл

@ -57,22 +57,26 @@
</Target>
<Target Name="Build" DependsOnTargets="CollectSetupProjects">
<PropertyGroup>
<CustomProps>AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</CustomProps>
</PropertyGroup>
<!-- Wix targets files doesn't handle localization parameters correctly. Cleaning before building files accross languages -->
<MSBuild Projects="%(WixSetupProjects.ProjectPath)"
Targets="Clean;Build"
Properties="LocaleCode=%(WixSetupProjects.LocaleCode);LocaleId=%(WixSetupProjects.LocaleId);LocaleParentId=%(WixSetupProjects.LocaleParentId);LocaleParentCulture=%(WixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(WixSetupProjects.LocaleSpecificCulture);IsLangPack=%(WixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion)"/>
Properties="LocaleCode=%(WixSetupProjects.LocaleCode);LocaleId=%(WixSetupProjects.LocaleId);LocaleParentId=%(WixSetupProjects.LocaleParentId);LocaleParentCulture=%(WixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(WixSetupProjects.LocaleSpecificCulture);IsLangPack=%(WixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);$(CustomProps)"/>
<MSBuild Projects="%(VsixProjects.ProjectPath)"
Targets="Build"
Properties="IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(InsertionDir)"/>
Properties="IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(InsertionDir);$(CustomProps)" />
<MSBuild Projects="%(SwixSetupProjects.ProjectPath)"
Targets="Build"
Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion)"/>
Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);$(CustomProps)"/>
<!-- copy json stuff -->
<Copy SourceFiles="@(InsertionItems)" DestinationFolder="$(InsertionDir)" />
<MSBuild Projects="Swix\Microsoft.FSharp.vsmanproj"
Targets="Build" />
Targets="Build"
Properties="$(CustomProps)" />
</Target>
<Target Name="CopyLocalizationResources" BeforeTargets="Build">

Просмотреть файл

@ -2,7 +2,7 @@
<packages>
<package id="System.Collections.Immutable" version="1.3.1" />
<package id="System.Reflection.Metadata" version="1.4.2" />
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
<package id="Microsoft.DiaSymReader.PortablePdb" version="1.2.0" />
<package id="Microsoft.DiaSymReader" version="1.1.0" />
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
<package id="MicroBuild.Core" version="0.2.0" />

Просмотреть файл

@ -3,7 +3,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(TargetDotnetProfile)'=='net40'">
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);PREFERRED_UI_LANG</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>

Просмотреть файл

@ -36,7 +36,7 @@
<RoslynVSBinariesVersion>15.0</RoslynVSBinariesVersion>
<RoslynVSPackagesVersion>15.0.26201</RoslynVSPackagesVersion>
<SystemCollectionsImmutableVersion>1.3.1</SystemCollectionsImmutableVersion>
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.0.26201</VSSDK_BUILDTOOLS_VERSION>
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.1.192</VSSDK_BUILDTOOLS_VERSION>
<MicrosoftVisualStudioThreadingVersion>15.3.23</MicrosoftVisualStudioThreadingVersion>
<MicrosoftVisualStudioValidationVersion>15.3.15</MicrosoftVisualStudioValidationVersion>
@ -50,12 +50,24 @@
<FSharpCore41FrozenPortableTargetVersion>4.1.21</FSharpCore41FrozenPortableTargetVersion>
<FSharpCore42TargetVersion>4.2.4</FSharpCore42TargetVersion>
<NUnitVersion>3.5.0</NUnitVersion>
<NUnitFullVersion>3.5.0.0</NUnitFullVersion>
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45</NUnitLibDir>
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\</NUnitToolsLibDir>
<!-- Localization -->
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
<XliffTasksVersion>0.2.0-beta-000076</XliffTasksVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' != 'Unix'">
<UseMicroBuild>true</UseMicroBuild>
<UseSourceLink Condition = " '$(UseSourceLink)' == '' AND '$(Configuration)'=='Release' ">false</UseSourceLink>
<UseGatherBinaries>true</UseGatherBinaries>
@ -138,11 +150,6 @@
<FsLexToolExe>fslex.exe</FsLexToolExe>
<FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
<!-- The version of MSBuild assumed byt the F# compiler in the Mono packaging of F# -->
<MonoPackagingMSBuildVersionSuffix>v12.0</MonoPackagingMSBuildVersionSuffix>
<MonoPackagingMSBuildVersionFull>12.0.0.0</MonoPackagingMSBuildVersionFull>
<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>

Просмотреть файл

@ -25,24 +25,11 @@
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<!-- In the open source "Mono" build we always fully sign the binaries with the public test.snk, apart from FSharp.Core, which gets the MSFT key -->
<When Condition="'$(MonoPackaging)' == 'true' AND '$(AssemblyName)'!='FSharp.Core'" >
<PropertyGroup>
<KeyOriginatorFile>$(FSharpSourcesRoot)\fsharp\test.snk</KeyOriginatorFile>
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion Condition="'$(MicroBuildAssemblyVersion)' == ''">$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<!-- In the Microsoft build we just delay-sign everything with the MSFT key -->
<!-- We have to do unit test DLLs well because they can see the internals of other strong-named DLLs -->
<Otherwise>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
@ -57,7 +44,6 @@
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
@ -88,7 +74,7 @@
<DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' != 'true'">
<PropertyGroup>
<DefineConstants>MSBUILD_AT_LEAST_14;$(DefineConstants)</DefineConstants>
</PropertyGroup>
@ -99,10 +85,6 @@
<PropertyGroup>
<NugetLocalPackagesDir>$(FSharpSourcesRoot)\..\packages</NugetLocalPackagesDir>
<NUnitVersion>3.5.0</NUnitVersion>
<NUnitFullVersion>3.5.0.0</NUnitFullVersion>
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45</NUnitLibDir>
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\</NUnitToolsLibDir>
<FsCheckVersion>2.6.2</FsCheckVersion>
<FsCheckFullVersion>2.6.2.0</FsCheckFullVersion>
<FsCheckLibDir>$(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\</FsCheckLibDir>
@ -156,7 +138,7 @@
<PropertyGroup >
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin</OutputPath>
<!-- When using coreclr to bootstrap to proto. We acquire the FSharp.Core LKG, targets LKG, the FSharp.Build LKG from the .NET Framework compiler tools LKG package. -->
<FSharpNetCoreLkgPath>$(FSharpSourcesRoot)\..\Tools\dotnet20\sdk\2.0.0-preview2-006502\FSharp</FSharpNetCoreLkgPath>
<FSharpNetCoreLkgPath>$(FSharpSourcesRoot)\..\Tools\dotnet20\sdk\2.0.3-servicing-007056\FSharp</FSharpNetCoreLkgPath>
<FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets</FSharpTargetsPath>
<!-- When using coreclr to bootstrap, the compiler binary comes from the coreclr LKG, invoked using corehost.exe -->

Просмотреть файл

@ -3384,10 +3384,10 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) =
let n,sigptr = sigptr_get_i32 bytes sigptr
if n = 0xFFFFFFFF then ILAttribElem.Null,sigptr else
let rec parseElems acc n sigptr =
if n = 0 then List.rev acc else
if n = 0 then List.rev acc, sigptr else
let v,sigptr = parseVal elemTy sigptr
parseElems (v ::acc) (n-1) sigptr
let elems = parseElems [] n sigptr
let elems, sigptr = parseElems [] n sigptr
ILAttribElem.Array(elemTy,elems), sigptr
| ILType.Value _ -> (* assume it is an enumeration *)
let n,sigptr = sigptr_get_i32 bytes sigptr
@ -3409,7 +3409,7 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) =
let et,sigptr = sigptr_get_u8 bytes sigptr
// We have a named value
let ty,sigptr =
if (0x50 = (int et) || 0x55 = (int et)) then
if ( (* 0x50 = (int et) || *) 0x55 = (int et)) then
let qualified_tname,sigptr = sigptr_get_serstring bytes sigptr
let unqualified_tname, rest =
let pieces = qualified_tname.Split(',')

Просмотреть файл

@ -287,7 +287,7 @@ type ILTypeRef =
member QualifiedName: string
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member QualifiedNameWithNoShortPrimaryAssembly: string
#endif

Просмотреть файл

@ -115,16 +115,6 @@ module Array =
Array.length l1 = Array.length l2 &&
Array.forall2 p l1 l2
let mapFold f s l =
let mutable acc = s
let n = Array.length l
let mutable res = Array.zeroCreate n
for i = 0 to n - 1 do
let h',s' = f acc l.[i]
res.[i] <- h';
acc <- s'
res, acc
let order (eltOrder: IComparer<'T>) =
{ new IComparer<array<'T>> with
member __.Compare(xs,ys) =
@ -450,15 +440,6 @@ module List =
| [] -> false
| h::t -> LanguagePrimitives.PhysicalEquality x h || memq x t
// Not tail recursive
let rec mapFoldBack f l s =
match l with
| [] -> ([],s)
| h::t ->
let t',s = mapFoldBack f t s
let h',s = f h s
(h'::t', s)
let mapNth n f xs =
let rec mn i = function
| [] -> []

Просмотреть файл

@ -3206,50 +3206,50 @@ and seekReadManifestResources ctxt () =
yield r ])
and seekReadNestedExportedTypes ctxt parentIdx =
and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) parentIdx =
mkILNestedExportedTypesLazy
(lazy
[ for i = 1 to ctxt.getNumRows TableNames.ExportedType do
let (flags, _tok, nameIdx, namespaceIdx, implIdx) = seekReadExportedTypeRow ctxt i
if not (isTopTypeDef flags) then
let (TaggedIndex(tag, idx) ) = implIdx
//let isTopTypeDef = (idx = 0 || tag <> i_ExportedType)
//if not isTopTypeDef then
match tag with
| tag when tag = i_ExportedType && idx = parentIdx ->
let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
yield
{ Name=nm
Access=(match typeAccessOfFlags flags with ILTypeDefAccess.Nested n -> n | _ -> failwith "non-nested access for a nested type described as being in an auxiliary module")
Nested=seekReadNestedExportedTypes ctxt i
CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) }
| _ -> () ])
nested.Force().[parentIdx-1]
|> List.map (fun i ->
let (flags, _tok, nameIdx, namespaceIdx, _implIdx) = exported.[i-1]
{ Name = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
Access = (match typeAccessOfFlags flags with
| ILTypeDefAccess.Nested n -> n
| _ -> failwith "non-nested access for a nested type described as being in an auxiliary module")
Nested = seekReadNestedExportedTypes ctxt exported nested i
CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) }
))
and seekReadTopExportedTypes ctxt () =
mkILExportedTypesLazy
(lazy
let res = ref []
for i = 1 to ctxt.getNumRows TableNames.ExportedType do
let (flags, _tok, nameIdx, namespaceIdx, implIdx) = seekReadExportedTypeRow ctxt i
if isTopTypeDef flags then
let (TaggedIndex(tag, _idx) ) = implIdx
let numRows = ctxt.getNumRows TableNames.ExportedType
let exported = [| for i in 1..numRows -> seekReadExportedTypeRow ctxt i |]
// the nested types will be picked up by their enclosing types
if tag <> i_ExportedType then
let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
// add each nested type id to their parent's children list
let nested = lazy (
let nested = [| for _i in 1..numRows -> [] |]
for i = 1 to numRows do
let (flags,_,_,_,TaggedIndex(tag, idx)) = exported.[i-1]
if not (isTopTypeDef flags) && (tag = i_ExportedType) then
nested.[idx-1] <- i :: nested.[idx-1]
nested)
let scoref = seekReadImplAsScopeRef ctxt implIdx
// return top exported types
[ for i = 1 to numRows do
let (flags, _tok, nameIdx, namespaceIdx, implIdx) = exported.[i-1]
let (TaggedIndex(tag, _idx)) = implIdx
let entry =
{ ScopeRef=scoref
Name=nm
IsForwarder = ((flags &&& 0x00200000) <> 0)
Access=typeAccessOfFlags flags
Nested=seekReadNestedExportedTypes ctxt i
CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) }
res := entry :: !res
done
List.rev !res)
// if not a nested type
if (isTopTypeDef flags) && (tag <> i_ExportedType) then
yield
{ ScopeRef = seekReadImplAsScopeRef ctxt implIdx
Name = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx)
IsForwarder = ((flags &&& 0x00200000) <> 0)
Access = typeAccessOfFlags flags
Nested = seekReadNestedExportedTypes ctxt exported nested i
CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) }
])
#if !FX_NO_PDB_READER
let getPdbReader opts infile =

Просмотреть файл

@ -36,25 +36,7 @@ open System.Runtime.InteropServices
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Unittests")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsc-proto")>]
#endif
#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsc, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsiAnyCpu, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.LanguageService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.LanguageService.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Interactive.Settings, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Server.Shared, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsc-proto, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
#endif
#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsc, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsiAnyCpu, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
@ -69,7 +51,6 @@ open System.Runtime.InteropServices
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.Compiler.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
#endif
// Until dotnet sdk can version assemblies, use this
#if BUILD_FROM_SOURCE

Просмотреть файл

@ -3,11 +3,6 @@
set __scriptpath=%~dp0
rem build tools
dotnet restore %__scriptpath%buildtools\fssrgen\fssrgen.fsproj
if ERRORLEVEL 1 echo Error: failed && goto :failure
dotnet publish %__scriptpath%buildtools\fssrgen\fssrgen.fsproj -o %__scriptpath%..\Tools\fssrgen
if ERRORLEVEL 1 echo Error: failed && goto :failure
dotnet restore %__scriptpath%buildtools\fslex\fslex.fsproj
if ERRORLEVEL 1 echo Error: failed && goto :failure
dotnet publish %__scriptpath%buildtools\fslex\fslex.fsproj -o %__scriptpath%..\Tools\fslex
@ -20,7 +15,7 @@ if ERRORLEVEL 1 echo Error: failed && goto :failure
rem build and pack tools
dotnet restore %__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj
if ERRORLEVEL 1 echo Error: failed && goto :failure
dotnet pack %__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj -c debug
dotnet pack %__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj -c Release
if ERRORLEVEL 1 echo Error: failed && goto :failure
goto :success

Просмотреть файл

@ -3,8 +3,6 @@
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
# build tools
dotnet restore $__scriptpath/buildtools/fssrgen/fssrgen.fsproj
dotnet publish $__scriptpath/buildtools/fssrgen/fssrgen.fsproj -o $__scriptpath/../Tools/fssrgen
dotnet restore $__scriptpath/buildtools/fslex/fslex.fsproj
dotnet publish $__scriptpath/buildtools/fslex/fslex.fsproj -o $__scriptpath/../Tools/fslex
dotnet restore $__scriptpath/buildtools/fsyacc/fsyacc.fsproj
@ -22,4 +20,4 @@ dotnet publish $__scriptpath/buildfromsource/Fsc/Fsc.fsproj
# build and pack tools
dotnet restore $__scriptpath/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj
dotnet pack $__scriptpath/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj -c release
dotnet pack $__scriptpath/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj -c Release

Просмотреть файл

@ -43,55 +43,12 @@
Condition="'$(DesignTimeBuild)' != 'true'">
<ItemGroup>
<Results Include="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')">
<Lines>
$([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText("%(CopyAndSubstituteText.FullPath)")), "%(CopyAndSubstituteText.Pattern1)", "%(CopyAndSubstituteText.Replacement1)"))
</Lines>
<Lines Condition = "'%(CopyAndSubstituteText.Pattern2)' != ''">
$([System.Text.RegularExpressions.Regex]::Replace($(FileText), "%(CopyAndSubstituteText.Pattern2)", "%(CopyAndSubstituteText.Replacement2)"))
</Lines>
</Results>
</ItemGroup>
<WriteLinesToFile File="$(OutDir)%(Results.Filename)%(Results.Extension)" Lines="%(Results.Lines)" Overwrite="true" />
</Target>
<!--
=========================================================================
Build FsSrGen files.
=========================================================================
-->
<Target Name="CallFsSrGen"
Inputs="@(FsSrGen)"
Outputs="@(FsSrGen->'$(IntermediateOutputPath)%(Filename).fs');@(FsSrGen->'$(IntermediateOutputPath)%(Filename).resx')"
Condition="'@(FsSrGen)' != ''">
<PropertyGroup>
<FsSrGenPath>$(MSBuildThisFileDirectory)../../Tools/fssrgen/fssrgen.dll</FsSrGenPath>
</PropertyGroup>
<!-- Create the output directory in case it doesn't exist yet -->
<MakeDir Directories="$(IntermediateOutputPath)" />
<!-- Run the tool -->
<Exec Command="&quot;$(DotNetExePath)&quot; &quot;$(FsSrGenPath)&quot; &quot;%(FsSrGen.FullPath)&quot; &quot;$(IntermediateOutputPath)%(FsSrGen.Filename).fs&quot; &quot;$(IntermediateOutputPath)%(FsSrGen.Filename).resx&quot; $(FsSrGenProjectName)" />
</Target>
<Target Name="ProcessFsSrGen"
DependsOnTargets="CallFsSrGen"
Condition="'@(FsSrGen)'!=''"
BeforeTargets="CoreResGen">
<ItemGroup>
<CompileBefore Include="$(IntermediateOutputPath)%(FsSrGen.Filename).fs" />
<FileWrites Include="$(IntermediateOutputPath)%(FsSrGen.Filename).fs" />
<FileWrites Include="$(IntermediateOutputPath)%(FsSrGen.Filename).resx" />
<EmbeddedResource Include="$(IntermediateOutputPath)%(FsSrGen.Filename).resx">
<ManifestResourceName>%(FsSrGen.Filename)</ManifestResourceName>
<Type>Resx</Type>
<WithCulture>false</WithCulture>
</EmbeddedResource>
<FileTextMap Include="%(CopyAndSubstituteText.TargetFilename)">
<FileText>$([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText("%(CopyAndSubstituteText.FullPath)")), "%(CopyAndSubstituteText.Pattern1)", "%(CopyAndSubstituteText.Replacement1)"))</FileText>
<FileText Condition = "'$(CurrentPattern2)' != ''">$([System.Text.RegularExpressions.Regex]::Replace($(FileText), "%(CopyAndSubstituteText.Pattern2)", "%(CopyAndSubstituteText.Replacement2)"))</FileText>
</FileTextMap>
</ItemGroup>
<WriteLinesToFile File="$(OutDir)%(FileTextMap.Identity)" Lines="%(FileTextMap.FileText)" Overwrite="true" />
</Target>
<ItemGroup>

Просмотреть файл

@ -0,0 +1,125 @@
// This is a generated file; the original input is 'FSBuild.txt'
namespace FSBuild
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Reflection
open System.Reflection
// (namespaces below for specific case of using the tool to compile FSharp.Core itself)
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Text
open Microsoft.FSharp.Collections
open Printf
type internal SR private() =
// BEGIN BOILERPLATE
static let getCurrentAssembly () =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
typeof<SR>.GetTypeInfo().Assembly
#else
System.Reflection.Assembly.GetExecutingAssembly()
#endif
static let getTypeInfo (t: System.Type) =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
t.GetTypeInfo()
#else
t
#endif
static let resources = lazy (new System.Resources.ResourceManager("FSBuild", getCurrentAssembly()))
static let GetString(name:string) =
let s = resources.Value.GetString(name, System.Globalization.CultureInfo.CurrentUICulture)
#if DEBUG
if null = s then
System.Diagnostics.Debug.Assert(false, sprintf "**RESOURCE ERROR**: Resource token %s does not exist!" name)
#endif
s
static let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) =
FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl)
static let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition()
static let isNamedType(ty:System.Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer)
static let isFunctionType (ty1:System.Type) =
isNamedType(ty1) && getTypeInfo(ty1).IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC)
static let rec destFunTy (ty:System.Type) =
if isFunctionType ty then
ty, ty.GetGenericArguments()
else
match getTypeInfo(ty).BaseType with
| null -> failwith "destFunTy: not a function type"
| b -> destFunTy b
static let buildFunctionForOneArgPat (ty: System.Type) impl =
let _,tys = destFunTy ty
let rty = tys.[1]
// PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"')
mkFunctionValue tys (fun inp -> impl rty inp)
static let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj =
match fmt.[i] with
| '%' -> go args ty (i+1)
| 'd'
| 'f'
| 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1))
| _ -> failwith "bad format specifier"
// newlines and tabs get converted to strings when read from a resource file
// this will preserve their original intention
static let postProcessString (s : string) =
s.Replace("\\n","\n").Replace("\\t","\t").Replace("\\r","\r").Replace("\\\"", "\"")
static let createMessageString (messageString : string) (fmt : Printf.StringFormat<'T>) : 'T =
let fmt = fmt.Value // here, we use the actual error string, as opposed to the one stored as fmt
let len = fmt.Length
/// Function to capture the arguments and then run.
let rec capture args ty i =
if i >= len || (fmt.[i] = '%' && i+1 >= len) then
let b = new System.Text.StringBuilder()
b.AppendFormat(messageString, [| for x in List.rev args -> x |]) |> ignore
box(b.ToString())
// REVIEW: For these purposes, this should be a nop, but I'm leaving it
// in incase we ever decide to support labels for the error format string
// E.g., "<name>%s<foo>%d"
elif System.Char.IsSurrogatePair(fmt,i) then
capture args ty (i+2)
else
match fmt.[i] with
| '%' ->
let i = i+1
capture1 fmt i args ty capture
| _ ->
capture args ty (i+1)
(unbox (capture [] (typeof<'T>) 0) : 'T)
static let mutable swallowResourceText = false
static let GetStringFunc((messageID : string),(fmt : Printf.StringFormat<'T>)) : 'T =
if swallowResourceText then
sprintf fmt
else
let mutable messageString = GetString(messageID)
messageString <- postProcessString messageString
createMessageString messageString fmt
/// If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines).
static member SwallowResourceText with get () = swallowResourceText
and set (b) = swallowResourceText <- b
// END BOILERPLATE
/// ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.
/// (Originally from FSBuild.txt:2)
static member toolpathUnknown() = (GetStringFunc("toolpathUnknown",",,,") )
/// Call this method once to validate that all known resources are valid; throws if not
static member RunStartupValidation() =
ignore(GetString("toolpathUnknown"))
()

Просмотреть файл

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="toolpathUnknown" xml:space="preserve">
<value>ToolPath is unknown; specify the path to fsc.exe as the ToolPath property.</value>
</data>
</root>

Просмотреть файл

@ -13,17 +13,19 @@
<Import Project="..\BuildFromSource.targets" />
<ItemGroup>
<FsSrGen Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSBuild.txt" />
<EmbeddedResource Include="FSBuild.resx">
<Link>FSBuild.resx</Link>
</EmbeddedResource>
<Compile Include="FSBuild.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\InternalsVisibleTo.fs" />
<Compile Include="..\..\assemblyinfo\assemblyinfo.FSharp.Build.dll.fs" />
<Compile Include="..\..\utils\CompilerLocationUtils.fs" />
<Compile Include="..\..\utils\reshapedreflection.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\Fsc.fsi" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSharpCommandLineBuilder.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\Fsc.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSharpEmbedResourceText.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSharpEmbedResXSource.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\WriteCodeFragment.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\CreateFSharpManifestResourceName.fsi" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\CreateFSharpManifestResourceName.fs" />
<CopyAndSubstituteText Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\Microsoft.FSharp.Targets">
<TargetFilename>Microsoft.FSharp.Targets</TargetFilename>

Просмотреть файл

@ -0,0 +1,121 @@
// This is a generated file; the original input is '..\FSInteractiveSettings.txt'
namespace FSInteractiveSettings
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Reflection
open System.Reflection
// (namespaces below for specific case of using the tool to compile FSharp.Core itself)
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Text
open Microsoft.FSharp.Collections
open Printf
type internal SR private() =
// BEGIN BOILERPLATE
static let getCurrentAssembly () =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
typeof<SR>.GetTypeInfo().Assembly
#else
System.Reflection.Assembly.GetExecutingAssembly()
#endif
static let getTypeInfo (t: System.Type) =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
t.GetTypeInfo()
#else
t
#endif
static let resources = lazy (new System.Resources.ResourceManager("FSInteractiveSettings", getCurrentAssembly()))
static let GetString(name:string) =
let s = resources.Value.GetString(name, System.Globalization.CultureInfo.CurrentUICulture)
#if DEBUG
if null = s then
System.Diagnostics.Debug.Assert(false, sprintf "**RESOURCE ERROR**: Resource token %s does not exist!" name)
#endif
s
static let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) =
FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl)
static let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition()
static let isNamedType(ty:System.Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer)
static let isFunctionType (ty1:System.Type) =
isNamedType(ty1) && getTypeInfo(ty1).IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC)
static let rec destFunTy (ty:System.Type) =
if isFunctionType ty then
ty, ty.GetGenericArguments()
else
match getTypeInfo(ty).BaseType with
| null -> failwith "destFunTy: not a function type"
| b -> destFunTy b
static let buildFunctionForOneArgPat (ty: System.Type) impl =
let _,tys = destFunTy ty
let rty = tys.[1]
// PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"')
mkFunctionValue tys (fun inp -> impl rty inp)
static let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj =
match fmt.[i] with
| '%' -> go args ty (i+1)
| 'd'
| 'f'
| 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1))
| _ -> failwith "bad format specifier"
// newlines and tabs get converted to strings when read from a resource file
// this will preserve their original intention
static let postProcessString (s : string) =
s.Replace("\\n","\n").Replace("\\t","\t").Replace("\\r","\r").Replace("\\\"", "\"")
static let createMessageString (messageString : string) (fmt : Printf.StringFormat<'T>) : 'T =
let fmt = fmt.Value // here, we use the actual error string, as opposed to the one stored as fmt
let len = fmt.Length
/// Function to capture the arguments and then run.
let rec capture args ty i =
if i >= len || (fmt.[i] = '%' && i+1 >= len) then
let b = new System.Text.StringBuilder()
b.AppendFormat(messageString, [| for x in List.rev args -> x |]) |> ignore
box(b.ToString())
// REVIEW: For these purposes, this should be a nop, but I'm leaving it
// in incase we ever decide to support labels for the error format string
// E.g., "<name>%s<foo>%d"
elif System.Char.IsSurrogatePair(fmt,i) then
capture args ty (i+2)
else
match fmt.[i] with
| '%' ->
let i = i+1
capture1 fmt i args ty capture
| _ ->
capture args ty (i+1)
(unbox (capture [] (typeof<'T>) 0) : 'T)
static let mutable swallowResourceText = false
static let GetStringFunc((messageID : string),(fmt : Printf.StringFormat<'T>)) : 'T =
if swallowResourceText then
sprintf fmt
else
let mutable messageString = GetString(messageID)
messageString <- postProcessString messageString
createMessageString messageString fmt
/// If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines).
static member SwallowResourceText with get () = swallowResourceText
and set (b) = swallowResourceText <- b
// END BOILERPLATE
/// Call this method once to validate that all known resources are valid; throws if not
static member RunStartupValidation() =
()

Просмотреть файл

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -9,13 +9,15 @@
<NoWarn>$(NoWarn);45;55;62;75;1182;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<FX_NO_LOADER>true</FX_NO_LOADER>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
</PropertyGroup>
<Import Project="..\BuildFromSource.targets" />
<ItemGroup>
<FsSrGen Include="$(FSharpSourcesRoot)\fsharp\FSInteractiveSettings.txt" />
<EmbeddedResource Include="FSInteractiveSettings.resx">
<Link>FSInteractiveSettings.resx</Link>
</EmbeddedResource>
<Compile Include="FSInteractiveSettings.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler.Interactive.Settings\InternalsVisibleTo.fs" />
<Compile Include="..\..\assemblyinfo\assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs" />
<Compile Include="InternalsVisibleTo.fs" />

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,333 @@
// This is a generated file; the original input is '..\fsi\FSIstrings.txt'
namespace FSIstrings
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Reflection
open System.Reflection
// (namespaces below for specific case of using the tool to compile FSharp.Core itself)
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Text
open Microsoft.FSharp.Collections
open Printf
type internal SR private() =
// BEGIN BOILERPLATE
static let getCurrentAssembly () =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
typeof<SR>.GetTypeInfo().Assembly
#else
System.Reflection.Assembly.GetExecutingAssembly()
#endif
static let getTypeInfo (t: System.Type) =
#if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0
t.GetTypeInfo()
#else
t
#endif
static let resources = lazy (new System.Resources.ResourceManager("FSIstrings", getCurrentAssembly()))
static let GetString(name:string) =
let s = resources.Value.GetString(name, System.Globalization.CultureInfo.CurrentUICulture)
#if DEBUG
if null = s then
System.Diagnostics.Debug.Assert(false, sprintf "**RESOURCE ERROR**: Resource token %s does not exist!" name)
#endif
s
static let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) =
FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl)
static let funTyC = typeof<(obj -> obj)>.GetGenericTypeDefinition()
static let isNamedType(ty:System.Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer)
static let isFunctionType (ty1:System.Type) =
isNamedType(ty1) && getTypeInfo(ty1).IsGenericType && (ty1.GetGenericTypeDefinition()).Equals(funTyC)
static let rec destFunTy (ty:System.Type) =
if isFunctionType ty then
ty, ty.GetGenericArguments()
else
match getTypeInfo(ty).BaseType with
| null -> failwith "destFunTy: not a function type"
| b -> destFunTy b
static let buildFunctionForOneArgPat (ty: System.Type) impl =
let _,tys = destFunTy ty
let rty = tys.[1]
// PERF: this technique is a bit slow (e.g. in simple cases, like 'sprintf "%x"')
mkFunctionValue tys (fun inp -> impl rty inp)
static let capture1 (fmt:string) i args ty (go : obj list -> System.Type -> int -> obj) : obj =
match fmt.[i] with
| '%' -> go args ty (i+1)
| 'd'
| 'f'
| 's' -> buildFunctionForOneArgPat ty (fun rty n -> go (n::args) rty (i+1))
| _ -> failwith "bad format specifier"
// newlines and tabs get converted to strings when read from a resource file
// this will preserve their original intention
static let postProcessString (s : string) =
s.Replace("\\n","\n").Replace("\\t","\t").Replace("\\r","\r").Replace("\\\"", "\"")
static let createMessageString (messageString : string) (fmt : Printf.StringFormat<'T>) : 'T =
let fmt = fmt.Value // here, we use the actual error string, as opposed to the one stored as fmt
let len = fmt.Length
/// Function to capture the arguments and then run.
let rec capture args ty i =
if i >= len || (fmt.[i] = '%' && i+1 >= len) then
let b = new System.Text.StringBuilder()
b.AppendFormat(messageString, [| for x in List.rev args -> x |]) |> ignore
box(b.ToString())
// REVIEW: For these purposes, this should be a nop, but I'm leaving it
// in incase we ever decide to support labels for the error format string
// E.g., "<name>%s<foo>%d"
elif System.Char.IsSurrogatePair(fmt,i) then
capture args ty (i+2)
else
match fmt.[i] with
| '%' ->
let i = i+1
capture1 fmt i args ty capture
| _ ->
capture args ty (i+1)
(unbox (capture [] (typeof<'T>) 0) : 'T)
static let mutable swallowResourceText = false
static let GetStringFunc((messageID : string),(fmt : Printf.StringFormat<'T>)) : 'T =
if swallowResourceText then
sprintf fmt
else
let mutable messageString = GetString(messageID)
messageString <- postProcessString messageString
createMessageString messageString fmt
/// If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines).
static member SwallowResourceText with get () = swallowResourceText
and set (b) = swallowResourceText <- b
// END BOILERPLATE
/// Stopped due to error\n
/// (Originally from ..\fsi\FSIstrings.txt:2)
static member stoppedDueToError() = (GetStringFunc("stoppedDueToError",",,,") )
/// Usage: %s <options> [script.fsx [<arguments>]]
/// (Originally from ..\fsi\FSIstrings.txt:3)
static member fsiUsage(a0 : System.String) = (GetStringFunc("fsiUsage",",,,%s,,,") a0)
/// - INPUT FILES -
/// (Originally from ..\fsi\FSIstrings.txt:4)
static member fsiInputFiles() = (GetStringFunc("fsiInputFiles",",,,") )
/// - CODE GENERATION -
/// (Originally from ..\fsi\FSIstrings.txt:5)
static member fsiCodeGeneration() = (GetStringFunc("fsiCodeGeneration",",,,") )
/// - ERRORS AND WARNINGS -
/// (Originally from ..\fsi\FSIstrings.txt:6)
static member fsiErrorsAndWarnings() = (GetStringFunc("fsiErrorsAndWarnings",",,,") )
/// - LANGUAGE -
/// (Originally from ..\fsi\FSIstrings.txt:7)
static member fsiLanguage() = (GetStringFunc("fsiLanguage",",,,") )
/// - MISCELLANEOUS -
/// (Originally from ..\fsi\FSIstrings.txt:8)
static member fsiMiscellaneous() = (GetStringFunc("fsiMiscellaneous",",,,") )
/// - ADVANCED -
/// (Originally from ..\fsi\FSIstrings.txt:9)
static member fsiAdvanced() = (GetStringFunc("fsiAdvanced",",,,") )
/// Exception raised when starting remoting server.\n%s
/// (Originally from ..\fsi\FSIstrings.txt:10)
static member fsiExceptionRaisedStartingServer(a0 : System.String) = (GetStringFunc("fsiExceptionRaisedStartingServer",",,,%s,,,") a0)
/// Use the given file on startup as initial input
/// (Originally from ..\fsi\FSIstrings.txt:11)
static member fsiUse() = (GetStringFunc("fsiUse",",,,") )
/// #load the given file on startup
/// (Originally from ..\fsi\FSIstrings.txt:12)
static member fsiLoad() = (GetStringFunc("fsiLoad",",,,") )
/// Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs
/// (Originally from ..\fsi\FSIstrings.txt:13)
static member fsiRemaining() = (GetStringFunc("fsiRemaining",",,,") )
/// Display this usage message (Short form: -?)
/// (Originally from ..\fsi\FSIstrings.txt:14)
static member fsiHelp() = (GetStringFunc("fsiHelp",",,,") )
/// Exit fsi after loading the files or running the .fsx script given on the command line
/// (Originally from ..\fsi\FSIstrings.txt:15)
static member fsiExec() = (GetStringFunc("fsiExec",",,,") )
/// Execute interactions on a Windows Forms event loop (on by default)
/// (Originally from ..\fsi\FSIstrings.txt:16)
static member fsiGui() = (GetStringFunc("fsiGui",",,,") )
/// Suppress fsi writing to stdout
/// (Originally from ..\fsi\FSIstrings.txt:17)
static member fsiQuiet() = (GetStringFunc("fsiQuiet",",,,") )
/// Support TAB completion in console (on by default)
/// (Originally from ..\fsi\FSIstrings.txt:18)
static member fsiReadline() = (GetStringFunc("fsiReadline",",,,") )
/// Emit debug information in quotations
/// (Originally from ..\fsi\FSIstrings.txt:19)
static member fsiEmitDebugInfoInQuotations() = (GetStringFunc("fsiEmitDebugInfoInQuotations",",,,") )
/// For help type #help;;
/// (Originally from ..\fsi\FSIstrings.txt:20)
static member fsiBanner3() = (GetStringFunc("fsiBanner3",",,,") )
/// A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'.
/// (Originally from ..\fsi\FSIstrings.txt:21)
static member fsiConsoleProblem() = (GetStringFunc("fsiConsoleProblem",",,,") )
/// '%s' is not a valid assembly name
/// (Originally from ..\fsi\FSIstrings.txt:22)
static member fsiInvalidAssembly(a0 : System.String) = (2301, GetStringFunc("fsiInvalidAssembly",",,,%s,,,") a0)
/// Directory '%s' doesn't exist
/// (Originally from ..\fsi\FSIstrings.txt:23)
static member fsiDirectoryDoesNotExist(a0 : System.String) = (2302, GetStringFunc("fsiDirectoryDoesNotExist",",,,%s,,,") a0)
/// Invalid directive '#%s %s'
/// (Originally from ..\fsi\FSIstrings.txt:24)
static member fsiInvalidDirective(a0 : System.String, a1 : System.String) = (GetStringFunc("fsiInvalidDirective",",,,%s,,,%s,,,") a0 a1)
/// Warning: line too long, ignoring some characters\n
/// (Originally from ..\fsi\FSIstrings.txt:25)
static member fsiLineTooLong() = (GetStringFunc("fsiLineTooLong",",,,") )
/// Real: %s, CPU: %s, GC %s
/// (Originally from ..\fsi\FSIstrings.txt:26)
static member fsiTimeInfoMainString(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("fsiTimeInfoMainString",",,,%s,,,%s,,,%s,,,") a0 a1 a2)
/// gen
/// (Originally from ..\fsi\FSIstrings.txt:27)
static member fsiTimeInfoGCGenerationLabelSomeShorthandForTheWordGeneration() = (GetStringFunc("fsiTimeInfoGCGenerationLabelSomeShorthandForTheWordGeneration",",,,") )
/// \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n
/// (Originally from ..\fsi\FSIstrings.txt:28)
static member fsiExceptionDuringPrettyPrinting(a0 : System.String) = (GetStringFunc("fsiExceptionDuringPrettyPrinting",",,,%s,,,") a0)
/// F# Interactive directives:
/// (Originally from ..\fsi\FSIstrings.txt:29)
static member fsiIntroTextHeader1directives() = (GetStringFunc("fsiIntroTextHeader1directives",",,,") )
/// Reference (dynamically load) the given DLL
/// (Originally from ..\fsi\FSIstrings.txt:30)
static member fsiIntroTextHashrInfo() = (GetStringFunc("fsiIntroTextHashrInfo",",,,") )
/// Add the given search path for referenced DLLs
/// (Originally from ..\fsi\FSIstrings.txt:31)
static member fsiIntroTextHashIInfo() = (GetStringFunc("fsiIntroTextHashIInfo",",,,") )
/// Load the given file(s) as if compiled and referenced
/// (Originally from ..\fsi\FSIstrings.txt:32)
static member fsiIntroTextHashloadInfo() = (GetStringFunc("fsiIntroTextHashloadInfo",",,,") )
/// Toggle timing on/off
/// (Originally from ..\fsi\FSIstrings.txt:33)
static member fsiIntroTextHashtimeInfo() = (GetStringFunc("fsiIntroTextHashtimeInfo",",,,") )
/// Display help
/// (Originally from ..\fsi\FSIstrings.txt:34)
static member fsiIntroTextHashhelpInfo() = (GetStringFunc("fsiIntroTextHashhelpInfo",",,,") )
/// Exit
/// (Originally from ..\fsi\FSIstrings.txt:35)
static member fsiIntroTextHashquitInfo() = (GetStringFunc("fsiIntroTextHashquitInfo",",,,") )
/// F# Interactive command line options:
/// (Originally from ..\fsi\FSIstrings.txt:36)
static member fsiIntroTextHeader2commandLine() = (GetStringFunc("fsiIntroTextHeader2commandLine",",,,") )
/// See '%s' for options
/// (Originally from ..\fsi\FSIstrings.txt:37)
static member fsiIntroTextHeader3(a0 : System.String) = (GetStringFunc("fsiIntroTextHeader3",",,,%s,,,") a0)
/// Loading
/// (Originally from ..\fsi\FSIstrings.txt:38)
static member fsiLoadingFilesPrefixText() = (GetStringFunc("fsiLoadingFilesPrefixText",",,,") )
/// \n- Interrupt\n
/// (Originally from ..\fsi\FSIstrings.txt:39)
static member fsiInterrupt() = (GetStringFunc("fsiInterrupt",",,,") )
/// \n- Exit...\n
/// (Originally from ..\fsi\FSIstrings.txt:40)
static member fsiExit() = (GetStringFunc("fsiExit",",,,") )
/// - Aborting main thread...
/// (Originally from ..\fsi\FSIstrings.txt:41)
static member fsiAbortingMainThread() = (GetStringFunc("fsiAbortingMainThread",",,,") )
/// Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s
/// (Originally from ..\fsi\FSIstrings.txt:42)
static member fsiCouldNotInstallCtrlCHandler(a0 : System.String) = (GetStringFunc("fsiCouldNotInstallCtrlCHandler",",,,%s,,,") a0)
/// --> Referenced '%s'
/// (Originally from ..\fsi\FSIstrings.txt:43)
static member fsiDidAHashr(a0 : System.String) = (GetStringFunc("fsiDidAHashr",",,,%s,,,") a0)
/// --> Referenced '%s' (file may be locked by F# Interactive process)
/// (Originally from ..\fsi\FSIstrings.txt:44)
static member fsiDidAHashrWithLockWarning(a0 : System.String) = (GetStringFunc("fsiDidAHashrWithLockWarning",",,,%s,,,") a0)
/// --> Referenced '%s' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly)
/// (Originally from ..\fsi\FSIstrings.txt:45)
static member fsiDidAHashrWithStaleWarning(a0 : System.String) = (GetStringFunc("fsiDidAHashrWithStaleWarning",",,,%s,,,") a0)
/// --> Added '%s' to library include path
/// (Originally from ..\fsi\FSIstrings.txt:46)
static member fsiDidAHashI(a0 : System.String) = (GetStringFunc("fsiDidAHashI",",,,%s,,,") a0)
/// --> Timing now on
/// (Originally from ..\fsi\FSIstrings.txt:47)
static member fsiTurnedTimingOn() = (GetStringFunc("fsiTurnedTimingOn",",,,") )
/// --> Timing now off
/// (Originally from ..\fsi\FSIstrings.txt:48)
static member fsiTurnedTimingOff() = (GetStringFunc("fsiTurnedTimingOff",",,,") )
/// - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart...
/// (Originally from ..\fsi\FSIstrings.txt:49)
static member fsiUnexpectedThreadAbortException() = (GetStringFunc("fsiUnexpectedThreadAbortException",",,,") )
/// Failed to resolve assembly '%s'
/// (Originally from ..\fsi\FSIstrings.txt:50)
static member fsiFailedToResolveAssembly(a0 : System.String) = (GetStringFunc("fsiFailedToResolveAssembly",",,,%s,,,") a0)
/// Binding session to '%s'...
/// (Originally from ..\fsi\FSIstrings.txt:51)
static member fsiBindingSessionTo(a0 : System.String) = (GetStringFunc("fsiBindingSessionTo",",,,%s,,,") a0)
/// Microsoft (R) F# Interactive version %s
/// (Originally from ..\fsi\FSIstrings.txt:52)
static member fsiProductName(a0 : System.String) = (GetStringFunc("fsiProductName",",,,%s,,,") a0)
/// F# Interactive for F# %s
/// (Originally from ..\fsi\FSIstrings.txt:53)
static member fsiProductNameCommunity(a0 : System.String) = (GetStringFunc("fsiProductNameCommunity",",,,%s,,,") a0)
/// Prevents references from being locked by the F# Interactive process
/// (Originally from ..\fsi\FSIstrings.txt:54)
static member shadowCopyReferences() = (GetStringFunc("shadowCopyReferences",",,,") )
/// Call this method once to validate that all known resources are valid; throws if not
static member RunStartupValidation() =
ignore(GetString("stoppedDueToError"))
ignore(GetString("fsiUsage"))
ignore(GetString("fsiInputFiles"))
ignore(GetString("fsiCodeGeneration"))
ignore(GetString("fsiErrorsAndWarnings"))
ignore(GetString("fsiLanguage"))
ignore(GetString("fsiMiscellaneous"))
ignore(GetString("fsiAdvanced"))
ignore(GetString("fsiExceptionRaisedStartingServer"))
ignore(GetString("fsiUse"))
ignore(GetString("fsiLoad"))
ignore(GetString("fsiRemaining"))
ignore(GetString("fsiHelp"))
ignore(GetString("fsiExec"))
ignore(GetString("fsiGui"))
ignore(GetString("fsiQuiet"))
ignore(GetString("fsiReadline"))
ignore(GetString("fsiEmitDebugInfoInQuotations"))
ignore(GetString("fsiBanner3"))
ignore(GetString("fsiConsoleProblem"))
ignore(GetString("fsiInvalidAssembly"))
ignore(GetString("fsiDirectoryDoesNotExist"))
ignore(GetString("fsiInvalidDirective"))
ignore(GetString("fsiLineTooLong"))
ignore(GetString("fsiTimeInfoMainString"))
ignore(GetString("fsiTimeInfoGCGenerationLabelSomeShorthandForTheWordGeneration"))
ignore(GetString("fsiExceptionDuringPrettyPrinting"))
ignore(GetString("fsiIntroTextHeader1directives"))
ignore(GetString("fsiIntroTextHashrInfo"))
ignore(GetString("fsiIntroTextHashIInfo"))
ignore(GetString("fsiIntroTextHashloadInfo"))
ignore(GetString("fsiIntroTextHashtimeInfo"))
ignore(GetString("fsiIntroTextHashhelpInfo"))
ignore(GetString("fsiIntroTextHashquitInfo"))
ignore(GetString("fsiIntroTextHeader2commandLine"))
ignore(GetString("fsiIntroTextHeader3"))
ignore(GetString("fsiLoadingFilesPrefixText"))
ignore(GetString("fsiInterrupt"))
ignore(GetString("fsiExit"))
ignore(GetString("fsiAbortingMainThread"))
ignore(GetString("fsiCouldNotInstallCtrlCHandler"))
ignore(GetString("fsiDidAHashr"))
ignore(GetString("fsiDidAHashrWithLockWarning"))
ignore(GetString("fsiDidAHashrWithStaleWarning"))
ignore(GetString("fsiDidAHashI"))
ignore(GetString("fsiTurnedTimingOn"))
ignore(GetString("fsiTurnedTimingOff"))
ignore(GetString("fsiUnexpectedThreadAbortException"))
ignore(GetString("fsiFailedToResolveAssembly"))
ignore(GetString("fsiBindingSessionTo"))
ignore(GetString("fsiProductName"))
ignore(GetString("fsiProductNameCommunity"))
ignore(GetString("shadowCopyReferences"))
()

Просмотреть файл

@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="stoppedDueToError" xml:space="preserve">
<value>Stopped due to error\n</value>
</data>
<data name="fsiUsage" xml:space="preserve">
<value>Usage: {0} &lt;options&gt; [script.fsx [&lt;arguments&gt;]]</value>
</data>
<data name="fsiInputFiles" xml:space="preserve">
<value>- INPUT FILES -</value>
</data>
<data name="fsiCodeGeneration" xml:space="preserve">
<value>- CODE GENERATION -</value>
</data>
<data name="fsiErrorsAndWarnings" xml:space="preserve">
<value>- ERRORS AND WARNINGS -</value>
</data>
<data name="fsiLanguage" xml:space="preserve">
<value>- LANGUAGE -</value>
</data>
<data name="fsiMiscellaneous" xml:space="preserve">
<value>- MISCELLANEOUS -</value>
</data>
<data name="fsiAdvanced" xml:space="preserve">
<value>- ADVANCED -</value>
</data>
<data name="fsiExceptionRaisedStartingServer" xml:space="preserve">
<value>Exception raised when starting remoting server.\n{0}</value>
</data>
<data name="fsiUse" xml:space="preserve">
<value>Use the given file on startup as initial input</value>
</data>
<data name="fsiLoad" xml:space="preserve">
<value>#load the given file on startup</value>
</data>
<data name="fsiRemaining" xml:space="preserve">
<value>Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs</value>
</data>
<data name="fsiHelp" xml:space="preserve">
<value>Display this usage message (Short form: -?)</value>
</data>
<data name="fsiExec" xml:space="preserve">
<value>Exit fsi after loading the files or running the .fsx script given on the command line</value>
</data>
<data name="fsiGui" xml:space="preserve">
<value>Execute interactions on a Windows Forms event loop (on by default)</value>
</data>
<data name="fsiQuiet" xml:space="preserve">
<value>Suppress fsi writing to stdout</value>
</data>
<data name="fsiReadline" xml:space="preserve">
<value>Support TAB completion in console (on by default)</value>
</data>
<data name="fsiEmitDebugInfoInQuotations" xml:space="preserve">
<value>Emit debug information in quotations</value>
</data>
<data name="fsiBanner3" xml:space="preserve">
<value>For help type #help;;</value>
</data>
<data name="fsiConsoleProblem" xml:space="preserve">
<value>A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools-&gt;Options-&gt;F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'.</value>
</data>
<data name="fsiInvalidAssembly" xml:space="preserve">
<value>'{0}' is not a valid assembly name</value>
</data>
<data name="fsiDirectoryDoesNotExist" xml:space="preserve">
<value>Directory '{0}' doesn't exist</value>
</data>
<data name="fsiInvalidDirective" xml:space="preserve">
<value>Invalid directive '#{0} {1}'</value>
</data>
<data name="fsiLineTooLong" xml:space="preserve">
<value>Warning: line too long, ignoring some characters\n</value>
</data>
<data name="fsiTimeInfoMainString" xml:space="preserve">
<value>Real: {0}, CPU: {1}, GC {2}</value>
</data>
<data name="fsiTimeInfoGCGenerationLabelSomeShorthandForTheWordGeneration" xml:space="preserve">
<value>gen</value>
</data>
<data name="fsiExceptionDuringPrettyPrinting" xml:space="preserve">
<value>\n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n</value>
</data>
<data name="fsiIntroTextHeader1directives" xml:space="preserve">
<value> F# Interactive directives:</value>
</data>
<data name="fsiIntroTextHashrInfo" xml:space="preserve">
<value>Reference (dynamically load) the given DLL</value>
</data>
<data name="fsiIntroTextHashIInfo" xml:space="preserve">
<value>Add the given search path for referenced DLLs</value>
</data>
<data name="fsiIntroTextHashloadInfo" xml:space="preserve">
<value>Load the given file(s) as if compiled and referenced</value>
</data>
<data name="fsiIntroTextHashtimeInfo" xml:space="preserve">
<value>Toggle timing on/off</value>
</data>
<data name="fsiIntroTextHashhelpInfo" xml:space="preserve">
<value>Display help</value>
</data>
<data name="fsiIntroTextHashquitInfo" xml:space="preserve">
<value>Exit</value>
</data>
<data name="fsiIntroTextHeader2commandLine" xml:space="preserve">
<value> F# Interactive command line options:</value>
</data>
<data name="fsiIntroTextHeader3" xml:space="preserve">
<value> See '{0}' for options</value>
</data>
<data name="fsiLoadingFilesPrefixText" xml:space="preserve">
<value>Loading</value>
</data>
<data name="fsiInterrupt" xml:space="preserve">
<value>\n- Interrupt\n</value>
</data>
<data name="fsiExit" xml:space="preserve">
<value>\n- Exit...\n</value>
</data>
<data name="fsiAbortingMainThread" xml:space="preserve">
<value>- Aborting main thread...</value>
</data>
<data name="fsiCouldNotInstallCtrlCHandler" xml:space="preserve">
<value>Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0}</value>
</data>
<data name="fsiDidAHashr" xml:space="preserve">
<value>--&gt; Referenced '{0}'</value>
</data>
<data name="fsiDidAHashrWithLockWarning" xml:space="preserve">
<value>--&gt; Referenced '{0}' (file may be locked by F# Interactive process)</value>
</data>
<data name="fsiDidAHashrWithStaleWarning" xml:space="preserve">
<value>--&gt; Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly)</value>
</data>
<data name="fsiDidAHashI" xml:space="preserve">
<value>--&gt; Added '{0}' to library include path</value>
</data>
<data name="fsiTurnedTimingOn" xml:space="preserve">
<value>--&gt; Timing now on</value>
</data>
<data name="fsiTurnedTimingOff" xml:space="preserve">
<value>--&gt; Timing now off</value>
</data>
<data name="fsiUnexpectedThreadAbortException" xml:space="preserve">
<value>- Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart...</value>
</data>
<data name="fsiFailedToResolveAssembly" xml:space="preserve">
<value>Failed to resolve assembly '{0}'</value>
</data>
<data name="fsiBindingSessionTo" xml:space="preserve">
<value>Binding session to '{0}'...</value>
</data>
<data name="fsiProductName" xml:space="preserve">
<value>Microsoft (R) F# Interactive version {0}</value>
</data>
<data name="fsiProductNameCommunity" xml:space="preserve">
<value>F# Interactive for F# {0}</value>
</data>
<data name="shadowCopyReferences" xml:space="preserve">
<value>Prevents references from being locked by the F# Interactive process</value>
</data>
</root>

Просмотреть файл

@ -8,7 +8,7 @@
<AssemblyName>FSharp.Compiler.Private</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING;COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
</PropertyGroup>
@ -18,12 +18,14 @@
<Link>assemblyinfo.FSharp.Compiler.Private.dll.fs</Link>
</Compile>
<Compile Include="InternalsVisibleTo.fs" />
<FsSrGen Include="$(FSharpSourcesRoot)\fsharp\FSComp.txt">
<Link>FSComp.txt</Link>
</FsSrGen>
<EmbeddedResource Include="FSComp.resx">
<Link>FSComp.resx</Link>
</EmbeddedResource>
<EmbeddedResource Include="$(FSharpSourcesRoot)\fsharp\FSStrings.resx">
<Link>FSStrings.resx</Link>
</EmbeddedResource>
<Compile Include="FSComp.fs" />
<Compile Include="FSIstrings.fs" />
<Compile Include="..\..\utils\reshapedreflection.fs">
<Link>Reflection\reshapedreflection.fs</Link>
</Compile>
@ -598,9 +600,9 @@
</Compile>
<!-- the core of the F# Interactive fsi.exe implementation -->
<FsSrGen Include="$(FSharpSourcesRoot)\fsharp\fsi\FSIstrings.txt">
<Link>FSIstrings.txt</Link>
</FsSrGen>
<EmbeddedResource Include="FSIstrings.resx">
<Link>FSIstrings.resx</Link>
</EmbeddedResource>
<Compile Include="$(FSharpSourcesRoot)\fsharp\fsi\fsi.fsi">
<Link>InteractiveSession\fsi.fsi</Link>
</Compile>
@ -621,27 +623,6 @@
</ItemGroup>
<Import Project = "..\BuildFromSource.targets" />
<!--
"System.Collections.Immutable":"1.3.1",
"System.Diagnostics.Process": "4.3.0",
"System.Diagnostics.TraceSource": "4.3.0",
"System.Linq.Expressions": "4.3.0",
"System.Linq.Queryable": "4.3.0",
"System.Net.Requests": "4.3.0",
"System.Reflection.Emit": "4.3.0",
"System.Reflection.Metadata": "1.4.2",
"System.Reflection.TypeExtensions": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.InteropServices": "4.3.0",
"System.Runtime.Loader": "4.3.0",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Threading.Tasks.Parallel": "4.3.0",
"System.Threading.Thread": "4.3.0",
"System.Threading.ThreadPool": "4.3.0",
"Microsoft.DiaSymReader.PortablePdb": "1.1.0",
"Microsoft.DiaSymReader": "1.1.0",
"System.ValueTuple": "4.3.1"
-->
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1"></PackageReference>
@ -660,7 +641,7 @@
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0"></PackageReference>
<PackageReference Include="System.Threading.Thread" Version="4.3.0"></PackageReference>
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0"></PackageReference>
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.1.0"></PackageReference>
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.2.0"></PackageReference>
<PackageReference Include="Microsoft.DiaSymReader" Version="1.1.0"></PackageReference>
<PackageReference Include="System.ValueTuple" Version="4.3.1"></PackageReference>
</ItemGroup>

Просмотреть файл

@ -14,12 +14,12 @@
<Import Project="..\BuildFromSource.targets" />
<PropertyGroup>
<BuildRevision>$([System.DateTime]::Now.ToString(`yyMMdd`))</BuildRevision>
<BuildRevision Condition="'$(BuildRevision)' == ''">$([System.DateTime]::Now.ToString(`yyMMdd`))</BuildRevision>
<PackageLicenceUrl Condition="'$(PackageLicenceUrl)' == ''">https://github.com/Microsoft/visualfsharp/blob/master/License.txt</PackageLicenceUrl>
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">https://github.com/Microsoft/visualfsharp</PackageProjectUrl>
<PackageAuthors Condition="'$(PackageAuthors)' == ''" >Microsoft and F# Software Foundation</PackageAuthors>
<PackageTags Condition="'$(PackageTags)' == ''" >Visual F# Compiler FSharp functional programming</PackageTags>
<PreReleaseSuffix Condition="'$(PreRelease)' != 'false'">-$(BuildRevision.Trim())-0</PreReleaseSuffix>
<PreReleaseSuffix Condition="'$(PreRelease)' != 'false'">-rc-$(BuildRevision.Trim())-0</PreReleaseSuffix>
<PackageVersion>4.2.0$(PreReleaseSuffix)</PackageVersion>
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)"</PackageProperties>
</PropertyGroup>

Просмотреть файл

@ -9,7 +9,7 @@
<AssemblyName>fsc</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING;COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
</PropertyGroup>

Просмотреть файл

@ -9,7 +9,7 @@
<AssemblyName>fsi</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);BUILD_FROM_SOURCE;COMPILER;EXTENSIONTYPING</DefineConstants>
<DefineConstants>$(DefineConstants);BUILD_FROM_SOURCE;COMPILER</DefineConstants>
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
</PropertyGroup>

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
</packageSources>
</configuration>

Просмотреть файл

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstant)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\buildtools\fslex\fslex.fsx" />
<ProjectReference Include="..\..\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstant)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\buildtools\fsyacc\fsyacc.fsx" />
<ProjectReference Include="..\..\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -14,7 +14,7 @@ open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.TcGlobals
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -228,7 +228,7 @@ let ComputeILAccess isPublic isFamily isFamilyOrAssembly isFamilyAndAssembly =
let IsILFieldInfoAccessible g amap m ad x =
match x with
| ILFieldInfo (tinfo,fd) -> IsILTypeAndMemberAccessible g amap m ad ad tinfo fd.Access
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField (amap, tpfi, m) as pfi ->
let access = tpfi.PUntaint((fun fi -> ComputeILAccess fi.IsPublic fi.IsFamily fi.IsFamilyOrAssembly fi.IsFamilyAndAssembly), m)
IsProvidedMemberAccessible amap m ad pfi.EnclosingType access
@ -314,7 +314,7 @@ let IsTypeAndMethInfoAccessible amap m adTyp ad = function
| ILMeth (g,x,_) -> IsILMethInfoAccessible g amap m adTyp ad x
| FSMeth (_,_,vref,_) -> IsValAccessible ad vref
| DefaultStructCtor(g,typ) -> IsTypeAccessible g amap m ad typ
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,tpmb,_,m) as etmi ->
let access = tpmb.PUntaint((fun mi -> ComputeILAccess mi.IsPublic mi.IsFamily mi.IsFamilyOrAssembly mi.IsFamilyAndAssembly), m)
IsProvidedMemberAccessible amap m ad etmi.EnclosingType access
@ -325,7 +325,7 @@ let IsPropInfoAccessible g amap m ad = function
| ILProp (_,x) -> IsILPropInfoAccessible g amap m ad x
| FSProp (_,_,Some vref,_)
| FSProp (_,_,_,Some vref) -> IsValAccessible ad vref
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp (amap, tppi, m) as pp->
let access =
let a = tppi.PUntaint((fun ppi ->

Просмотреть файл

@ -19,7 +19,7 @@ open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.TcGlobals
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
open Microsoft.FSharp.Core.CompilerServices
#endif
@ -130,7 +130,7 @@ let AttribInfosOfFS g attribs =
let GetAttribInfosOfEntity g amap m (tcref:TyconRef) =
match metadataOfTycon tcref.Deref with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// TODO: provided attributes
| ProvidedTypeMetadata _info -> []
//let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)),m)
@ -149,7 +149,7 @@ let GetAttribInfosOfMethod amap m minfo =
| ILMeth (g,ilminfo,_) -> ilminfo.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap ilminfo.MetadataScope m
| FSMeth (g,_,vref,_) -> vref.Attribs |> AttribInfosOfFS g
| DefaultStructCtor _ -> []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// TODO: provided attributes
| ProvidedMeth (_,_mi,_,_m) ->
[]
@ -162,7 +162,7 @@ let GetAttribInfosOfProp amap m pinfo =
| FSProp(g,_,Some vref,_)
| FSProp(g,_,_,Some vref) -> vref.Attribs |> AttribInfosOfFS g
| FSProp _ -> failwith "GetAttribInfosOfProp: unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// TODO: provided attributes
| ProvidedProp _ -> []
#endif
@ -171,7 +171,7 @@ let GetAttribInfosOfEvent amap m einfo =
match einfo with
| ILEvent(g, x) -> x.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap x.ILTypeInfo.ILScopeRef m
| FSEvent(_, pi, _vref1, _vref2) -> GetAttribInfosOfProp amap m pi
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// TODO: provided attributes
| ProvidedEvent _ -> []
#endif
@ -183,7 +183,7 @@ let GetAttribInfosOfEvent amap m einfo =
let TryBindTyconRefAttribute g m (AttribInfo (atref,_) as args) (tcref:TyconRef) f1 f2 f3 =
ignore m; ignore f3
match metadataOfTycon tcref.Deref with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)),m)
match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)),m) with
@ -207,14 +207,14 @@ let BindMethInfoAttributes m minfo f1 f2 f3 =
| ILMeth (_,x,_) -> f1 x.RawMetadata.CustomAttrs
| FSMeth (_,_,vref,_) -> f2 vref.Attribs
| DefaultStructCtor _ -> f2 []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth (_,mi,_,_) -> f3 (mi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m))
#endif
/// Analyze three cases for attributes declared on methods: IL-declared attributes, F#-declared attributes and
/// provided attributes.
let TryBindMethInfoAttribute g m (AttribInfo(atref,_) as attribSpec) minfo f1 f2 f3 =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
#else
// to prevent unused parameter warning
ignore f3
@ -222,7 +222,7 @@ let TryBindMethInfoAttribute g m (AttribInfo(atref,_) as attribSpec) minfo f1 f2
BindMethInfoAttributes m minfo
(fun ilAttribs -> TryDecodeILAttribute g atref ilAttribs |> Option.bind f1)
(fun fsAttribs -> TryFindFSharpAttribute g attribSpec fsAttribs |> Option.bind f2)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
(fun provAttribs ->
match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)),m) with
| Some args -> f3 args
@ -316,7 +316,7 @@ let CheckFSharpAttributes g attribs m =
CompleteD
)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Check a list of provided attributes for 'ObsoleteAttribute', returning errors and warnings as data
let private CheckProvidedAttributes (g: TcGlobals) m (provAttribs: Tainted<IProvidedCustomAttributeProvider>) =
let (AttribInfo(tref,_)) = g.attrib_SystemObsolete
@ -368,7 +368,7 @@ let CheckFSharpAttributesForUnseen g attribs _m =
(CheckFSharpAttributesForObsolete g attribs ||
CheckFSharpAttributesForHidden g attribs)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Indicate if a list of provided attributes contains 'ObsoleteAttribute'. Used to suppress the item in intellisense.
let CheckProvidedAttributesForUnseen (provAttribs: Tainted<IProvidedCustomAttributeProvider>) m =
provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), typeof<System.ObsoleteAttribute>.FullName).IsSome),m)
@ -381,7 +381,7 @@ let CheckPropInfoAttributes pinfo m =
| FSProp(g,_,Some vref,_)
| FSProp(g,_,_,Some vref) -> CheckFSharpAttributes g vref.Attribs m
| FSProp _ -> failwith "CheckPropInfoAttributes: unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp (amap,pi,m) ->
CheckProvidedAttributes amap.g m (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m))
@ -393,7 +393,7 @@ let CheckILFieldAttributes g (finfo:ILFieldInfo) m =
match finfo with
| ILFieldInfo(_,pd) ->
CheckILAttributes g pd.CustomAttrs m |> CommitOperationResult
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField (amap,fi,m) ->
CheckProvidedAttributes amap.g m (fi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) |> CommitOperationResult
#endif
@ -411,7 +411,7 @@ let CheckMethInfoAttributes g m tyargsOpt minfo =
else
CompleteD)
Some res)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
(fun provAttribs -> Some (CheckProvidedAttributes g m provAttribs))
#else
(fun _provAttribs -> None)
@ -427,7 +427,7 @@ let MethInfoIsUnseen g m typ minfo =
match BindMethInfoAttributes m minfo
(fun ilAttribs -> Some(CheckILAttributesForUnseen g ilAttribs m))
(fun fsAttribs -> Some(CheckFSharpAttributesForUnseen g fsAttribs m))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
(fun provAttribs -> Some(CheckProvidedAttributesForUnseen provAttribs m))
#else
(fun _provAttribs -> None)
@ -437,7 +437,7 @@ let MethInfoIsUnseen g m typ minfo =
| None -> false
let isUnseenByHidingAttribute =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
not (isObjTy g typ) &&
isAppTy g typ &&
isObjTy g minfo.EnclosingType &&
@ -470,7 +470,7 @@ let PropInfoIsUnseen m pinfo =
| FSProp (g,_,Some vref,_)
| FSProp (g,_,_,Some vref) -> CheckFSharpAttributesForUnseen g vref.Attribs m
| FSProp _ -> failwith "CheckPropInfoAttributes: unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp (_amap,pi,m) ->
CheckProvidedAttributesForUnseen (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) m
#endif

Просмотреть файл

@ -4,11 +4,12 @@
module internal Microsoft.FSharp.Compiler.CompileOps
open System
open System.Diagnostics
open System.Text
open System.IO
open System.Collections.Concurrent
open System.Collections.Generic
open System.Diagnostics
open System.IO
open System.Runtime.CompilerServices
open System.Text
open Internal.Utilities
open Internal.Utilities.Text
@ -49,7 +50,7 @@ open Microsoft.FSharp.Compiler.PrettyNaming
open Microsoft.FSharp.Compiler.Import
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
open Microsoft.FSharp.Core.CompilerServices
#endif
@ -101,7 +102,7 @@ exception HashLoadedScriptConsideredSource of range
let GetRangeOfDiagnostic(err:PhasedDiagnostic) =
let rec RangeFromException = function
| ErrorFromAddingConstraint(_, err2, _) -> RangeFromException err2
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ExtensionTyping.ProvidedTypeResolutionNoRange(e) -> RangeFromException e
| ExtensionTyping.ProvidedTypeResolution(m, _)
#endif
@ -233,7 +234,7 @@ let GetRangeOfDiagnostic(err:PhasedDiagnostic) =
// Strip TargetInvocationException wrappers
| :? System.Reflection.TargetInvocationException as e ->
RangeFromException e.InnerException
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| :? TypeProviderError as e -> e.Range |> Some
#endif
@ -352,7 +353,7 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) =
| UnresolvedConversionOperator _ -> 93
// avoid 94-100 for safety
| ObsoleteError _ -> 101
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ExtensionTyping.ProvidedTypeResolutionNoRange _
| ExtensionTyping.ProvidedTypeResolution _ -> 103
#endif
@ -369,7 +370,7 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) =
| Failure _ -> 192
| NumberedError((n, _), _) -> n
| IllegalFileNameChar(fileName, invalidChar) -> fst (FSComp.SR.buildUnexpectedFileNameCharacter(fileName, string invalidChar))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| :? TypeProviderError as e -> e.Number
#endif
| ErrorsFromAddingSubsumptionConstraint (_, _, _, _, _, ContextInfo.DowncastUsedInsteadOfUpcast _, _) -> fst (FSComp.SR.considerUpcast("", ""))
@ -747,7 +748,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) =
| ErrorFromAddingConstraint(_, e, _) ->
OutputExceptionR os e
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ExtensionTyping.ProvidedTypeResolutionNoRange(e)
| ExtensionTyping.ProvidedTypeResolution(_, e) ->
@ -1726,7 +1727,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
relatedErrors |> List.iter OutputRelatedError
match err with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| {Exception = (:? TypeProviderError as tpe)} ->
tpe.Iter (fun e ->
let newErr = {err with Exception = e}
@ -1774,20 +1775,25 @@ let OutputDiagnosticContext prefix fileLineFn os err =
let GetFSharpCoreLibraryName () = "FSharp.Core"
// If necessary assume a reference to the latest .NET Framework FSharp.Core with which those tools are built.
let GetDefaultFSharpCoreReference() = typeof<list<int>>.Assembly.Location
let GetDefaultFSharpCoreReference () = typeof<list<int>>.Assembly.Location
// If necessary assume a reference to the latest System.ValueTuple with which those tools are built.
let GetDefaultSystemValueTupleReference() =
#if COMPILER_SERVICE_AS_DLL
None // TODO, right now FCS doesn't add this reference automatically
#else
type private TypeInThisAssembly = class end
// Use the ValueTuple that is executing with the compiler if it is from System.ValueTuple
// or the System.ValueTuple.dll that sits alongside the compiler. (Note we always ship one with the compiler)
let GetDefaultSystemValueTupleReference () =
try
let asm = typeof<System.ValueTuple<int, int>>.Assembly
if asm.FullName.StartsWith "System.ValueTuple" then
Some asm.Location
else None
let asm = typeof<System.ValueTuple<int, int>>.Assembly
if asm.FullName.StartsWith "System.ValueTuple" then
Some asm.Location
else
let location = Path.GetDirectoryName(typeof<TypeInThisAssembly>.Assembly.Location)
let valueTuplePath = Path.Combine(location, "System.ValueTuple.dll")
if File.Exists(valueTuplePath) then
Some valueTuplePath
else
None
with _ -> None
#endif
let GetFsiLibraryName () = "FSharp.Compiler.Interactive.Settings"
@ -1821,6 +1827,7 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) =
yield "System.Collections" // System.Collections.Generic.List<T>
yield "System.Runtime.Numerics" // BigInteger
yield "System.Threading" // OperationCanceledException
// always include a default reference to System.ValueTuple.dll in scripts and out-of-project sources
match GetDefaultSystemValueTupleReference() with
| None -> ()
@ -2137,14 +2144,14 @@ type AssemblyReference =
override x.ToString() = sprintf "AssemblyReference(%s)" x.Text
type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted<ITypeProvider> list
#endif
type ImportedBinary =
{ FileName: string
RawMetadata: IRawFSharpAssemblyData
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
ProviderGeneratedAssembly: System.Reflection.Assembly option
IsProviderGenerated: bool
ProviderGeneratedStaticLinkMap : ProvidedAssemblyStaticLinkingMap option
@ -2157,7 +2164,7 @@ type ImportedAssembly =
FSharpViewOfMetadata: CcuThunk
AssemblyAutoOpenAttributes: string list
AssemblyInternalsVisibleToAttributes: string list
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
IsProviderGenerated: bool
mutable TypeProviders: Tainted<Microsoft.FSharp.Core.CompilerServices.ITypeProvider> list
#endif
@ -2291,7 +2298,7 @@ type TcConfigBuilder =
mutable showTimes : bool
mutable showLoadedAssemblies : bool
mutable continueAfterParseFailure : bool
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// show messages about extension type resolution?
mutable showExtensionTypeMessages : bool
#endif
@ -2450,7 +2457,7 @@ type TcConfigBuilder =
showTimes = false
showLoadedAssemblies = false
continueAfterParseFailure = false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
showExtensionTypeMessages = false
#endif
pause = false
@ -2916,7 +2923,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) =
member x.showTimes = data.showTimes
member x.showLoadedAssemblies = data.showLoadedAssemblies
member x.continueAfterParseFailure = data.continueAfterParseFailure
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member x.showExtensionTypeMessages = data.showExtensionTypeMessages
#endif
member x.pause = data.pause
@ -3503,14 +3510,14 @@ let PostParseModuleSpecs (defaultNamespace, filename, isLastCompiland, ParsedSig
ParsedInput.SigFile(ParsedSigFileInput(filename, qualName, scopedPragmas, hashDirectives, specs))
/// Checks if a module name is already given and deduplicates the name if needed.
let DeduplicateModuleName (moduleNamesDict:Dictionary<string, Set<string>>) (paths: Set<string>) path (qualifiedNameOfFile: QualifiedNameOfFile) =
let DeduplicateModuleName (moduleNamesDict:IDictionary<string, Set<string>>) (paths: Set<string>) path (qualifiedNameOfFile: QualifiedNameOfFile) =
let count = if paths.Contains path then paths.Count else paths.Count + 1
moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.add path paths
let id = qualifiedNameOfFile.Id
if count = 1 then qualifiedNameOfFile else QualifiedNameOfFile(Ident(id.idText + "___" + count.ToString(), id.idRange))
/// Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed.
let DeduplicateParsedInputModuleName (moduleNamesDict:Dictionary<string, Set<string>>) input =
let DeduplicateParsedInputModuleName (moduleNamesDict:IDictionary<string, Set<string>>) input =
match input with
| ParsedInput.ImplFile (ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe))) ->
let path = Path.GetDirectoryName fileName
@ -3519,7 +3526,7 @@ let DeduplicateParsedInputModuleName (moduleNamesDict:Dictionary<string, Set<str
let qualifiedNameOfFile = DeduplicateModuleName moduleNamesDict paths path qualifiedNameOfFile
ParsedInput.ImplFile(ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe)))
| _ ->
moduleNamesDict.Add(qualifiedNameOfFile.Text, Set.singleton path)
moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.singleton path
input
| ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules)) ->
let path = Path.GetDirectoryName fileName
@ -3528,7 +3535,7 @@ let DeduplicateParsedInputModuleName (moduleNamesDict:Dictionary<string, Set<str
let qualifiedNameOfFile = DeduplicateModuleName moduleNamesDict paths path qualifiedNameOfFile
ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules))
| _ ->
moduleNamesDict.Add(qualifiedNameOfFile.Text, Set.singleton path)
moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.singleton path
input
let ParseInput (lexer, errorLogger:ErrorLogger, lexbuf:UnicodeLexing.Lexbuf, defaultNamespace, filename, isLastCompiland) =
@ -3913,7 +3920,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
let mutable disposed = false
let mutable ilGlobalsOpt = ilGlobalsOpt
let mutable tcGlobals = None
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let mutable generatedTypeRoots = new System.Collections.Generic.Dictionary<ILTypeRef, int * ProviderGeneratedType>()
#endif
@ -4032,7 +4039,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
| UnresolvedImportedAssembly _ -> UnresolvedCcu(assref.QualifiedName)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member tcImports.GetProvidedAssemblyInfo(ctok, m, assembly: Tainted<ProvidedAssembly>) =
let anameOpt = assembly.PUntaint((fun assembly -> match assembly with null -> None | a -> Some (a.GetName())), m)
match anameOpt with
@ -4183,7 +4190,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
{ new Import.AssemblyLoader with
member x.FindCcuFromAssemblyRef (ctok, m, ilAssemblyRef) =
tcImports.FindCcuFromAssemblyRef (ctok, m, ilAssemblyRef)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member x.GetProvidedAssemblyInfo (ctok, m, assembly) = tcImports.GetProvidedAssemblyInfo (ctok, m, assembly)
member x.RecordGeneratedTypeRoot root = tcImports.RecordGeneratedTypeRoot root
#endif
@ -4215,7 +4222,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
CheckDisposed()
tcGlobals <- Some g
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member private tcImports.InjectProvidedNamespaceOrTypeIntoEntity
(typeProviderEnvironment,
tcConfig:TcConfig,
@ -4413,14 +4420,14 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
ILScopeRef = ilScopeRef
AssemblyAutoOpenAttributes = GetAutoOpenAttributes ilg ilModule
AssemblyInternalsVisibleToAttributes = GetInternalsVisibleToAttributes ilg ilModule
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
IsProviderGenerated = false
TypeProviders = []
#endif
FSharpOptimizationData = notlazy None }
tcImports.RegisterCcu(ccuinfo)
let phase2 () =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
ccuinfo.TypeProviders <- tcImports.ImportTypeProviderExtensions (ctok, tcConfig, filename, ilScopeRef, ilModule.ManifestOfAssembly.CustomAttrs.AsList, ccu.Contents, invalidateCcu, m)
#endif
[ResolvedImportedAssembly(ccuinfo)]
@ -4428,7 +4435,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
member tcImports.PrepareToImportReferencedFSharpAssembly (ctok, m, filename, dllinfo:ImportedBinary) =
CheckDisposed()
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let tcConfig = tcConfigP.Get(ctok)
#endif
let ilModule = dllinfo.RawMetadata
@ -4448,7 +4455,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
let minfo : PickledCcuInfo = data.RawData
let mspec = minfo.mspec
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let invalidateCcu = new Event<_>()
#endif
@ -4461,7 +4468,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
SourceCodeDirectory = codeDir (* note: in some cases we fix up this information later *)
IsFSharp=true
Contents = mspec
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
InvalidateEvent=invalidateCcu.Publish
IsProviderGenerated = false
ImportProvidedType = (fun ty -> Import.ImportProvidedType (tcImports.GetImportMap()) m ty)
@ -4489,13 +4496,13 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
AssemblyAutoOpenAttributes = ilModule.GetAutoOpenAttributes(ilg)
AssemblyInternalsVisibleToAttributes = ilModule.GetInternalsVisibleToAttributes(ilg)
FSharpOptimizationData=optdata
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
IsProviderGenerated = false
TypeProviders = []
#endif
ILScopeRef = ilScopeRef }
let phase2() =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match ilModule.TryGetRawILModule() with
| None -> () // no type providers can be used without a real IL Module present
| Some ilModule ->
@ -4511,7 +4518,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
(* Relink *)
(* dprintf "Phase2: %s\n" filename; REMOVE DIAGNOSTICS *)
ccuRawDataAndInfos |> List.iter (fun (data, _, _) -> data.OptionalFixup(fun nm -> availableToOptionalCcu(tcImports.FindCcu(ctok, m, nm, lookupOnly=false))) |> ignore)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
ccuRawDataAndInfos |> List.iter (fun (_, _, phase2) -> phase2())
#endif
ccuRawDataAndInfos |> List.map p23 |> List.map ResolvedImportedAssembly
@ -4549,7 +4556,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
let dllinfo =
{ RawMetadata=assemblyData
FileName=filename
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
ProviderGeneratedAssembly=None
IsProviderGenerated=false
ProviderGeneratedStaticLinkMap = None
@ -4616,7 +4623,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
if tryFile (assemblyName + ".dll") then ()
else tryFile (assemblyName + ".exe") |> ignore
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member tcImports.TryFindProviderGeneratedAssemblyByName(ctok, assemblyName:string) : System.Reflection.Assembly option =
// The assembly may not be in the resolutions, but may be in the load set including EST injected assemblies
match tcImports.TryFindDllInfo (ctok, range0, assemblyName, lookupOnly=true) with
@ -5065,13 +5072,7 @@ module private ScriptPreprocessClosure =
match codeContext with
| CodeContext.Editing -> ResolutionEnvironment.EditingOrCompilation true
| CodeContext.Compilation -> ResolutionEnvironment.EditingOrCompilation false
| CodeContext.CompilationAndEvaluation ->
#if FSI_TODO_NETCORE
// "CompilationAndEvaluation" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
ResolutionEnvironment.EditingOrCompilation false
#else
ResolutionEnvironment.CompilationAndEvaluation
#endif
| CodeContext.CompilationAndEvaluation -> ResolutionEnvironment.CompilationAndEvaluation
tcConfigB.framework <- false
tcConfigB.useSimpleResolution <- useSimpleResolution
// Indicates that there are some references not in BasicReferencesForScriptLoadClosure which should
@ -5359,7 +5360,7 @@ let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImpo
let ccuData : CcuData =
{ IsFSharp=true
UsesFSharp20PlusQuotations=false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
InvalidateEvent=(new Event<_>()).Publish
IsProviderGenerated = false
ImportProvidedType = (fun ty -> Import.ImportProvidedType (tcImports.GetImportMap()) m ty)

Просмотреть файл

@ -23,7 +23,7 @@ open Microsoft.FSharp.Compiler.Infos
open Microsoft.FSharp.Compiler.ReferenceResolver
open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Core.CompilerServices
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -65,10 +65,10 @@ val ComputeQualifiedNameOfFileFromUniquePath: range * string list -> Ast.Qualifi
val PrependPathToInput: Ast.Ident list -> Ast.ParsedInput -> Ast.ParsedInput
/// Checks if a module name is already given and deduplicates the name if needed.
val DeduplicateModuleName: Dictionary<string,Set<string>> -> Set<string> -> string -> Ast.QualifiedNameOfFile -> Ast.QualifiedNameOfFile
val DeduplicateModuleName: IDictionary<string,Set<string>> -> Set<string> -> string -> Ast.QualifiedNameOfFile -> Ast.QualifiedNameOfFile
/// Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed.
val DeduplicateParsedInputModuleName: Dictionary<string,Set<string>> -> Ast.ParsedInput -> Ast.ParsedInput
val DeduplicateParsedInputModuleName: IDictionary<string,Set<string>> -> Ast.ParsedInput -> Ast.ParsedInput
val ParseInput: (UnicodeLexing.Lexbuf -> Parser.token) * ErrorLogger * UnicodeLexing.Lexbuf * string option * string * isLastCompiland:(bool * bool) -> Ast.ParsedInput
@ -207,7 +207,7 @@ type AssemblyResolution =
type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted<ITypeProvider> list
#endif
@ -347,7 +347,7 @@ type TcConfigBuilder =
mutable showTimes: bool
mutable showLoadedAssemblies: bool
mutable continueAfterParseFailure: bool
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
mutable showExtensionTypeMessages: bool
#endif
mutable pause: bool
@ -499,7 +499,7 @@ type TcConfig =
member showTimes: bool
member showLoadedAssemblies: bool
member continueAfterParseFailure: bool
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member showExtensionTypeMessages: bool
#endif
member pause: bool
@ -555,7 +555,7 @@ type TcConfigProvider =
type ImportedBinary =
{ FileName: string
RawMetadata: IRawFSharpAssemblyData
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
ProviderGeneratedAssembly: System.Reflection.Assembly option
IsProviderGenerated: bool
ProviderGeneratedStaticLinkMap: ProvidedAssemblyStaticLinkingMap option
@ -570,7 +570,7 @@ type ImportedAssembly =
FSharpViewOfMetadata: CcuThunk
AssemblyAutoOpenAttributes: string list
AssemblyInternalsVisibleToAttributes: string list
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
IsProviderGenerated: bool
mutable TypeProviders: Tainted<Microsoft.FSharp.Core.CompilerServices.ITypeProvider> list
#endif
@ -599,7 +599,7 @@ type TcImports =
member FindDllInfo: CompilationThreadToken * range * string -> ImportedBinary
member TryFindDllInfo: CompilationThreadToken * range * string * lookupOnly: bool -> option<ImportedBinary>
member FindCcuFromAssemblyRef: CompilationThreadToken * range * ILAssemblyRef -> CcuResolutionResult
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
member ProviderGeneratedTypeRoots: ProviderGeneratedType list
#endif
member GetImportMap: unit -> Import.ImportMap
@ -617,7 +617,7 @@ type TcImports =
/// Try to find the given assembly reference.
member TryFindExistingFullyQualifiedPathByExactAssemblyRef: CompilationThreadToken * ILAssemblyRef -> string option
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Try to find a provider-generated assembly
member TryFindProviderGeneratedAssemblyByName: CompilationThreadToken * assemblyName:string -> System.Reflection.Assembly option
#endif

Просмотреть файл

@ -903,7 +903,7 @@ let internalFlags (tcConfigB:TcConfigBuilder) =
CompilerOption("splitting", tagNone, OptionSwitch(splittingSwitch tcConfigB),Some(InternalCommandLineOption("splitting", rangeCmdArgs)), None)
CompilerOption("versionfile", tagString, OptionString (fun s -> tcConfigB.version <- VersionFile s), Some(InternalCommandLineOption("versionfile", rangeCmdArgs)), None)
CompilerOption("times" , tagNone, OptionUnit (fun () -> tcConfigB.showTimes <- true), Some(InternalCommandLineOption("times", rangeCmdArgs)), None) // "Display timing profiles for compilation")
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
CompilerOption("showextensionresolution" , tagNone, OptionUnit (fun () -> tcConfigB.showExtensionTypeMessages <- true), Some(InternalCommandLineOption("showextensionresolution", rangeCmdArgs)), None) // "Display information about extension type resolution")
#endif
(* BEGIN: Consider as public Retail option? *)

Просмотреть файл

@ -1333,7 +1333,7 @@ and RecordMemberConstraintSolution css m trace traitInfo res =
/// Convert a MethInfo into the data we save in the TAST
and MemberConstraintSolutionOfMethInfo css m minfo minst =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
#else
// to prevent unused parameter warning
ignore css
@ -1347,7 +1347,7 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst =
FSMethSln(typ, vref, minst)
| MethInfo.DefaultStructCtor _ ->
error(InternalError("the default struct constructor was the unexpected solution to a trait constraint", m))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap, mi, _, m) ->
let g = amap.g
let minst = [] // GENERIC TYPE PROVIDERS: for generics, we would have an minst here
@ -2050,7 +2050,7 @@ and ReportNoCandidatesError (csenv:ConstraintSolverEnv) (nUnnamedCallerArgs, nNa
let predictFields() =
minfo.DeclaringEntityRef.AllInstanceFieldsAsList
|> List.map (fun p -> p.Name.Replace("@", ""))
|> Set.ofList
|> System.Collections.Generic.HashSet
ErrorWithSuggestions((msgNum, FSComp.SR.csCtorHasNoArgumentOrReturnProperty(methodName, id.idText, msgText)), id.idRange, id.idText, predictFields)
else

Просмотреть файл

@ -54,9 +54,9 @@ let rec findOriginalException err =
| WrappedError(err, _) -> findOriginalException err
| _ -> err
type Suggestions = unit -> Set<string>
type Suggestions = unit -> Collections.Generic.HashSet<string>
let NoSuggestions : Suggestions = fun () -> Set.empty
let NoSuggestions : Suggestions = fun () -> Collections.Generic.HashSet()
/// Thrown when we stop processing the F# Interactive entry or #load.
exception StopProcessingExn of exn option with

Просмотреть файл

@ -4,7 +4,7 @@
namespace Microsoft.FSharp.Compiler
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
module internal ExtensionTyping =
open System

Просмотреть файл

@ -4,7 +4,7 @@
namespace Microsoft.FSharp.Compiler
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
module internal ExtensionTyping =

Просмотреть файл

@ -22,16 +22,13 @@
<Compile Include="..\..\utils\CompilerLocationUtils.fs">
<Link>CompilerLocationUtils.fs</Link>
</Compile>
<Compile Include="..\FSharp.Build\CreateFSharpManifestResourceName.fsi">
<Link>CreateFSharpManifestResourceName.fsi</Link>
</Compile>
<Compile Include="..\FSharp.Build\CreateFSharpManifestResourceName.fs" >
<Link>CreateFSharpManifestResourceName.fs</Link>
</Compile>
<Compile Include="..\FSharp.Build\Fsc.fsi">
<Link>Fsc.fsi</Link>
</Compile>
<Compile Include="..\FSharp.Build\Fsc.fs">
<Compile Include="..\FSharp.Build\FSharpCommandLineBuilder.fs">
<Link>FSharpCommandLineBuilder.fs</Link>
</Compile>
<Compile Include="..\FSharp.Build\Fsc.fs">
<Link>Fsc.fs</Link>
</Compile>
<Compile Include="..\FSharp.Build\FSharpEmbedResourceText.fs">
@ -75,7 +72,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' != 'true' ">
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr'">
<Reference Include="Microsoft.Build.Framework, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll</HintPath>
</Reference>
@ -93,22 +90,5 @@
<Name>FSharp.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' ">
<Reference Include="Microsoft.Build.Framework, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>

Просмотреть файл

@ -20,7 +20,7 @@
<TargetProfile Condition=" '$(TargetDotnetProfile)' == 'coreclr' ">netcore</TargetProfile>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING;$(TargetDotnetProfile.ToLower())</DefineConstants>
<DefineConstants>$(DefineConstants);$(TargetDotnetProfile.ToLower())</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -1,9 +0,0 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace Microsoft.FSharp.Build
[<Class>]
type CreateFSharpManifestResourceName =
inherit Microsoft.Build.Tasks.CreateCSharpManifestResourceName
public new : unit -> CreateFSharpManifestResourceName
member UseStandardResourceNames : bool with get,set

Просмотреть файл

@ -15,20 +15,22 @@
</PropertyGroup>
<ItemGroup>
<FilesToLocalize Include="$(OutDir)$(AssemblyName).dll">
<TranslationFile>$(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl</TranslationFile>
<LciCommentFile>$(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci</LciCommentFile>
<HasLceComments>false</HasLceComments>
<InProject>false</InProject>
</FilesToLocalize>
<InternalsVisibleTo Include="VisualFSharp.Unittests" />
</ItemGroup>
<ItemGroup>
<EmbeddedText Include="FSBuild.txt" />
<Compile Include="..\..\assemblyinfo\assemblyinfo.FSharp.Build.dll.fs" />
<Compile Include="..\..\utils\CompilerLocationUtils.fs" />
<Compile Include="..\..\utils\reshapedreflection.fs" />
<Compile Include="Fsc.fsi" />
<Compile Include="FSharpCommandLineBuilder.fs" />
<Compile Include="Fsc.fs" />
<Compile Include="FSharpEmbedResourceText.fs" />
<Compile Include="FSharpEmbedResXSource.fs" />
<Compile Include="WriteCodeFragment.fs" />
<Compile Include="CreateFSharpManifestResourceName.fsi" />
<Compile Include="CreateFSharpManifestResourceName.fs" />
<CopyAndSubstituteText Include="Microsoft.FSharp.Targets">
<TargetFilename>Microsoft.FSharp.Targets</TargetFilename>
@ -58,7 +60,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' != 'true' ">
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr'">
<Reference Include="Microsoft.Build.Framework, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll</HintPath>
</Reference>
@ -72,23 +74,6 @@
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' ">
<Reference Include="Microsoft.Build.Framework, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' " >
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' " >
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' " >
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' " >
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' " >
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>

Просмотреть файл

@ -0,0 +1,106 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace Microsoft.FSharp.Build
open System
open System.Text
open Microsoft.Build.Framework
open Microsoft.Build.Utilities
open Internal.Utilities
[<assembly: System.Runtime.InteropServices.ComVisible(false)>]
[<assembly: System.CLSCompliant(true)>]
do()
type FSharpCommandLineBuilder () =
// In addition to generating a command-line that will be handed to cmd.exe, we also generate
// an array of individual arguments. The former needs to be quoted (and cmd.exe will strip the
// quotes while parsing), whereas the latter is not. See bug 4357 for background; this helper
// class gets us out of the business of unparsing-then-reparsing arguments.
let builder = new CommandLineBuilder()
let mutable args = [] // in reverse order
let mutable srcs = [] // in reverse order
/// Return a list of the arguments (with no quoting for the cmd.exe shell)
member x.CapturedArguments() = List.rev args
/// Return a list of the sources (with no quoting for the cmd.exe shell)
member x.CapturedFilenames() = List.rev srcs
/// Return a full command line (with quoting for the cmd.exe shell)
override x.ToString() = builder.ToString()
member x.AppendFileNamesIfNotNull(filenames:ITaskItem array, sep:string) =
builder.AppendFileNamesIfNotNull(filenames, sep)
// do not update "args", not used
for item in filenames do
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull("", item.ItemSpec) // we don't want to quote the filename, this is a way to get that
let s = tmp.ToString()
if s <> String.Empty then
srcs <- tmp.ToString() :: srcs
member x.AppendSwitchIfNotNull(switch:string, values:string array, sep:string) =
builder.AppendSwitchIfNotNull(switch, values, sep)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, values, sep)
let s = tmp.ToString()
if s <> String.Empty then
args <- s :: args
member x.AppendSwitchIfNotNull(switch:string, value:string, ?metadataNames:string array) =
let metadataNames = defaultArg metadataNames [||]
builder.AppendSwitchIfNotNull(switch, value)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, value)
let providedMetaData =
metadataNames
|> Array.filter (String.IsNullOrWhiteSpace >> not)
if providedMetaData.Length > 0 then
tmp.AppendTextUnquoted ","
tmp.AppendTextUnquoted (providedMetaData|> String.concat ",")
let s = tmp.ToString()
if s <> String.Empty then
args <- s :: args
member x.AppendSwitchUnquotedIfNotNull(switch:string, value:string) =
assert(switch = "") // we only call this method for "OtherFlags"
// Unfortunately we still need to mimic what cmd.exe does, but only for "OtherFlags".
let ParseCommandLineArgs(commandLine:string) = // returns list in reverse order
let mutable args = []
let mutable i = 0 // index into commandLine
let len = commandLine.Length
while i < len do
// skip whitespace
while i < len && System.Char.IsWhiteSpace(commandLine, i) do
i <- i + 1
if i < len then
// parse an argument
let sb = new StringBuilder()
let mutable finished = false
let mutable insideQuote = false
while i < len && not finished do
match commandLine.[i] with
| '"' -> insideQuote <- not insideQuote; i <- i + 1
| c when not insideQuote && System.Char.IsWhiteSpace(c) -> finished <- true
| c -> sb.Append(c) |> ignore; i <- i + 1
args <- sb.ToString() :: args
args
builder.AppendSwitchUnquotedIfNotNull(switch, value)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, value)
let s = tmp.ToString()
if s <> String.Empty then
args <- ParseCommandLineArgs(s) @ args
member x.AppendSwitch(switch:string) =
builder.AppendSwitch(switch)
args <- switch :: args
member internal x.GetCapturedArguments() =
[|
yield! x.CapturedArguments()
yield! x.CapturedFilenames()
|]

Просмотреть файл

@ -3,125 +3,28 @@
namespace Microsoft.FSharp.Build
open System
open System.Text
open System.Diagnostics.CodeAnalysis
open System.Diagnostics
open System.Globalization
open System.IO
open System.Reflection
open Microsoft.Build.Framework
open Microsoft.Build.Utilities
open Internal.Utilities
[<assembly: System.Runtime.InteropServices.ComVisible(false)>]
[<assembly: System.CLSCompliant(true)>]
[<assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="type", Target="Microsoft.FSharp.Build.Fsc", MessageId="Fsc")>]
do()
#if FX_RESHAPED_REFLECTION
open Microsoft.FSharp.Core.ReflectionAdapters
#endif
type FscCommandLineBuilder () =
// In addition to generating a command-line that will be handed to cmd.exe, we also generate
// an array of individual arguments. The former needs to be quoted (and cmd.exe will strip the
// quotes while parsing), whereas the latter is not. See bug 4357 for background; this helper
// class gets us out of the business of unparsing-then-reparsing arguments.
let builder = new CommandLineBuilder()
let mutable args = [] // in reverse order
let mutable srcs = [] // in reverse order
/// Return a list of the arguments (with no quoting for the cmd.exe shell)
member x.CapturedArguments() =
List.rev args
/// Return a list of the sources (with no quoting for the cmd.exe shell)
member x.CapturedFilenames() =
List.rev srcs
/// Return a full command line (with quoting for the cmd.exe shell)
override x.ToString() =
builder.ToString()
member x.AppendFileNamesIfNotNull(filenames:ITaskItem array, sep:string) =
builder.AppendFileNamesIfNotNull(filenames, sep)
// do not update "args", not used
for item in filenames do
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull("", item.ItemSpec) // we don't want to quote the filename, this is a way to get that
let s = tmp.ToString()
if s <> String.Empty then
srcs <- tmp.ToString() :: srcs
member x.AppendSwitchIfNotNull(switch:string, values:string array, sep:string) =
builder.AppendSwitchIfNotNull(switch, values, sep)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, values, sep)
let s = tmp.ToString()
if s <> String.Empty then
args <- s :: args
member x.AppendSwitchIfNotNull(switch:string, value:string, ?metadataNames:string array) =
let metadataNames = defaultArg metadataNames [||]
builder.AppendSwitchIfNotNull(switch, value)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, value)
let providedMetaData =
metadataNames
|> Array.filter (String.IsNullOrWhiteSpace >> not)
if providedMetaData.Length > 0 then
tmp.AppendTextUnquoted ","
tmp.AppendTextUnquoted (providedMetaData|> String.concat ",")
let s = tmp.ToString()
if s <> String.Empty then
args <- s :: args
member x.AppendSwitchUnquotedIfNotNull(switch:string, value:string) =
assert(switch = "") // we only call this method for "OtherFlags"
// Unfortunately we still need to mimic what cmd.exe does, but only for "OtherFlags".
let ParseCommandLineArgs(commandLine:string) = // returns list in reverse order
let mutable args = []
let mutable i = 0 // index into commandLine
let len = commandLine.Length
while i < len do
// skip whitespace
while i < len && System.Char.IsWhiteSpace(commandLine, i) do
i <- i + 1
if i < len then
// parse an argument
let sb = new StringBuilder()
let mutable finished = false
let mutable insideQuote = false
while i < len && not finished do
match commandLine.[i] with
| '"' -> insideQuote <- not insideQuote; i <- i + 1
| c when not insideQuote && System.Char.IsWhiteSpace(c) -> finished <- true
| c -> sb.Append(c) |> ignore; i <- i + 1
args <- sb.ToString() :: args
args
builder.AppendSwitchUnquotedIfNotNull(switch, value)
let tmp = new CommandLineBuilder()
tmp.AppendSwitchUnquotedIfNotNull(switch, value)
let s = tmp.ToString()
if s <> String.Empty then
args <- ParseCommandLineArgs(s) @ args
member x.AppendSwitch(switch:string) =
builder.AppendSwitch(switch)
args <- switch :: args
member internal x.GetCapturedArguments() =
[|
yield! x.CapturedArguments()
yield! x.CapturedFilenames()
|]
//There are a lot of flags on fsc.exe.
//For now, not all of them are represented in the "Fsc class" object model.
//The goal is to have the most common/important flags available via the Fsc class, and the
//rest can be "backdoored" through the .OtherFlags property.
type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")>] Fsc() as this =
inherit ToolTask()
[<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")>]
type public Fsc () as this =
inherit ToolTask ()
let mutable baseAddress : string = null
let mutable capturedArguments : string list = [] // list of individual args, to pass to HostObject Compile()
let mutable capturedFilenames : string list = [] // list of individual source filenames, to pass to HostObject Compile()
@ -162,7 +65,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
let mutable toolExe : string = "fsc.exe"
let mutable toolPath : string =
let locationOfThisDll =
try Some(System.IO.Path.GetDirectoryName(typeof<FscCommandLineBuilder>.Assembly.Location))
try Some(Path.GetDirectoryName(typeof<Fsc>.Assembly.Location))
with _ -> None
match FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(locationOfThisDll) with
| Some s -> s
@ -178,18 +81,11 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
let mutable vslcid : string = null
let mutable utf8output : bool = false
#if ENABLE_MONO_SUPPORT
// The property YieldDuringToolExecution is not available on Mono.
// So we only set it if available (to avoid a compile-time dependency).
let runningOnMono = try System.Type.GetType("Mono.Runtime") <> null with e-> false
do if not runningOnMono then
typeof<ToolTask>.InvokeMember("YieldDuringToolExecution",(BindingFlags.Instance ||| BindingFlags.SetProperty ||| BindingFlags.Public),null,this,[| box true |]) |> ignore
#else
do this.YieldDuringToolExecution <- true // See bug 6483; this makes parallel build faster, and is fine to set unconditionally
#endif
// See bug 6483; this makes parallel build faster, and is fine to set unconditionally
do this.YieldDuringToolExecution <- true
let generateCommandLineBuilder () =
let builder = new FscCommandLineBuilder()
let builder = new FSharpCommandLineBuilder()
// OutputAssembly
builder.AppendSwitchIfNotNull("-o:", outputAssembly)
// CodePage
@ -246,8 +142,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
| "ANYCPU", _, _ -> "anycpu"
| "X86" , _, _ -> "x86"
| "X64" , _, _ -> "x64"
| "ITANIUM", _, _ -> "Itanium"
| _ -> null)
| _ -> null)
// Resources
if resources <> null then
for item in resources do
@ -435,13 +330,13 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
with get() = otherFlags
and set(s) = otherFlags <- s
// -o <string>: Name the output file.
// -o <string>: Name the output file
member fsc.OutputAssembly
with get() = outputAssembly
and set(s) = outputAssembly <- s
// --pdb <string>:
// Name the debug output file.
// Name the debug output file
member fsc.PdbFile
with get() = pdbFile
and set(s) = pdbFile <- s
@ -449,7 +344,6 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
// --platform <string>: Limit which platforms this code can run on:
// x86
// x64
// Itanium
// anycpu
// anycpu32bitpreferred
member fsc.Platform
@ -529,6 +423,7 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
member fsc.UseStandardResourceNames
with get() = useStandardResourceNames
and set(s) = useStandardResourceNames <- s
// --version-file <string>:
member fsc.VersionFile
with get() = versionFile
@ -604,30 +499,42 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
| null -> base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands)
| _ ->
let sources = sources|>Array.map(fun i->i.ItemSpec)
#if FX_NO_CONVERTER
let baseCallDelegate = new Func<int>(fun () -> fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands) )
#else
let baseCall = fun (dummy : int) -> fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands)
// We are using a Converter<int,int> rather than a "unit->int" because it is too hard to
// figure out how to pass an F# function object via reflection.
let baseCallDelegate = new System.Converter<int,int>(baseCall)
#endif
let invokeCompiler baseCallDelegate =
try
let ret =
(host.GetType()).InvokeMember("Compile", BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.InvokeMethod ||| BindingFlags.Instance, null, host,
[| baseCallDelegate; box (capturedArguments |> List.toArray); box (capturedFilenames |> List.toArray) |],
CultureInfo.InvariantCulture)
unbox ret
with
| :? TargetInvocationException as tie when (match tie.InnerException with | :? Microsoft.Build.Exceptions.BuildAbortedException -> true | _ -> false) ->
fsc.Log.LogError(tie.InnerException.Message, [| |])
-1 // ok, this is what happens when VS IDE cancels the build, no need to assert, just log the build-canceled error and return -1 to denote task failed
| e -> reraise()
// Todo: Remove !FX_NO_CONVERTER code path for VS2017.7
// Earlier buildtasks usesd System.Converter<int,int> for cross platform we are moving to Func<int>
// This is so that during the interim, earlier VS's will still load the OSS project
let baseCallDelegate = Func<int>(fun () -> fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands) )
try
let ret =
(host.GetType()).InvokeMember("Compile", BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.InvokeMethod ||| BindingFlags.Instance, null, host,
[| baseCallDelegate; box (capturedArguments |> List.toArray); box (capturedFilenames |> List.toArray) |],
System.Globalization.CultureInfo.InvariantCulture)
unbox ret
invokeCompiler baseCallDelegate
with
| :? System.Reflection.TargetInvocationException as tie when (match tie.InnerException with | :? Microsoft.Build.Exceptions.BuildAbortedException -> true | _ -> false) ->
fsc.Log.LogError(tie.InnerException.Message, [| |])
-1 // ok, this is what happens when VS IDE cancels the build, no need to assert, just log the build-canceled error and return -1 to denote task failed
| e ->
System.Diagnostics.Debug.Assert(false, "HostObject received by Fsc task did not have a Compile method or the compile method threw an exception. "+(e.ToString()))
reraise()
#if !FX_NO_CONVERTER
try
let baseCall = fun (dummy : int) -> fsc.BaseExecuteTool(pathToTool, responseFileCommands, commandLineCommands)
// We are using a Converter<int,int> rather than a "unit->int" because it is too hard to
// figure out how to pass an F# function object via reflection.
let baseCallDelegate = new System.Converter<int,int>(baseCall)
invokeCompiler baseCallDelegate
with
| e ->
#endif
Debug.Assert(false, "HostObject received by Fsc task did not have a Compile method or the compile method threw an exception. "+(e.ToString()))
reraise()
override fsc.GenerateCommandLineCommands() =
let builder = new FscCommandLineBuilder()
let builder = new FSharpCommandLineBuilder()
if not (String.IsNullOrEmpty(dotnetFscCompilerPath)) then builder.AppendSwitch(dotnetFscCompilerPath)
builder.ToString()
@ -651,7 +558,3 @@ type [<Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:Iden
yield! capturedArguments
yield! capturedFilenames
|]
module Attributes =
//[<assembly: System.Security.SecurityTransparent>]
do()

Просмотреть файл

@ -1,65 +0,0 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
/// This namespace contains. MSBuild tasks for the FsYacc and FsLex tools.
namespace Microsoft.FSharp.Build
type Fsc = class
inherit Microsoft.Build.Utilities.ToolTask
new : unit -> Fsc
override GenerateCommandLineCommands : unit -> System.String
override GenerateFullPathToTool : unit -> System.String
override ToolName : System.String
override StandardErrorEncoding : System.Text.Encoding
override StandardOutputEncoding : System.Text.Encoding
member internal InternalGenerateFullPathToTool : unit -> System.String
member internal InternalGenerateCommandLineCommands : unit -> System.String
member internal InternalGenerateResponseFileCommands : unit -> System.String
member internal InternalExecuteTool : string * string * string -> int
member internal GetCapturedArguments : unit -> string[]
member BaseAddress : string with get,set
member CodePage : string with get,set
member CommandLineArgs : Microsoft.Build.Framework.ITaskItem [] with get,set
member DebugSymbols : bool with get,set
member DebugType : string with get,set
member DefineConstants : Microsoft.Build.Framework.ITaskItem [] with get,set
member DelaySign : bool with get,set
member DisabledWarnings : string with get,set
member DocumentationFile : string with get,set
member DotnetFscCompilerPath : string with get,set
member Embed : string with get,set
member EmbedAllSources : bool with get,set
member GenerateInterfaceFile : string with get,set
member HighEntropyVA : bool with get,set
member KeyFile : string with get,set
member LCID : string with get,set
member NoFramework : bool with get,set
member Optimize : bool with get,set
member OtherFlags : string with get,set
member OutputAssembly : string with get,set
member PdbFile : string with get,set
member Platform : string with get,set
member Prefer32Bit : bool with get,set
member PreferredUILang : string with get,set
member ProvideCommandLineArgs : bool with get,set
member PublicSign : bool with get,set
member VersionFile : string with get,set
member References : Microsoft.Build.Framework.ITaskItem [] with get,set
member ReferencePath : string with get,set
member Resources : Microsoft.Build.Framework.ITaskItem [] with get,set
member SkipCompilerExecution : bool with get,set
member SourceLink : string with get,set
member Sources : Microsoft.Build.Framework.ITaskItem [] with get,set
member SubsystemVersion : string with get,set
member Tailcalls : bool with get,set
member TargetType : string with get,set
member ToolPath : string with get,set
member TargetProfile : string with get,set
member TreatWarningsAsErrors : bool with get,set
member UseStandardResourceNames : bool with get,set
member Utf8Output : bool with get,set
member VisualStudioStyleErrors : bool with get,set
member WarningLevel : string with get,set
member WarningsAsErrors : string with get,set
member Win32ResourceFile : string with get,set
member Win32ManifestFile : string with get,set
end

Просмотреть файл

@ -10,7 +10,6 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{649FA588-F02E-457C-9FCF-87E46407481E}</ProjectGuid>
<OutputType>Library</OutputType>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<AssemblyName>FSharp.Compiler.Interactive.Settings</AssemblyName>
<FileAlignment>512</FileAlignment>
</PropertyGroup>

Просмотреть файл

@ -10,7 +10,6 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<AssemblyName>FSharp.Compiler.Private</AssemblyName>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
<NoWarn>$(NoWarn);62;9</NoWarn>
<ProjectGuid>{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}</ProjectGuid>
@ -683,7 +682,7 @@
<Reference Include="System.Numerics" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>..\..\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
@ -698,44 +697,19 @@
<HintPath>..\..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="Microsoft.Build.Framework, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Utilities.Core, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Tasks.Core, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll</HintPath>
</Reference>
</ItemGroup>
<Choose>
<When Condition="$(MonoPackaging) != 'true'">
<ItemGroup Condition="'$(TargetDotnetProfile)' != 'coreclr'">
<Reference Include="Microsoft.Build.Framework, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Utilities.Core, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Tasks.Core, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll</HintPath>
</Reference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>

Просмотреть файл

@ -31,13 +31,13 @@
<dependency id="System.Threading.Tasks.Parallel" version="4.0.1" />
<dependency id="System.Threading.Thread" version="4.0.0" />
<dependency id="System.Threading.ThreadPool" version="4.0.10" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.2.0" />
<dependency id="Microsoft.DiaSymReader" version="1.1.0" />
<dependency id="System.ValueTuple" version="4.3.1" />
</group>
</dependencies>
</metadata>
<files>
<file src="FSharp.Compiler.Private.dll" target="lib/netstandard1.6" />
<file src="FSharp.Compiler.Private.dll" target="lib\netstandard1.6" />
</files>
</package>

Просмотреть файл

@ -17,7 +17,7 @@
"System.Threading.Tasks.Parallel": "4.3.0",
"System.Threading.Thread": "4.3.0",
"System.Threading.ThreadPool": "4.3.0",
"Microsoft.DiaSymReader.PortablePdb": "1.1.0",
"Microsoft.DiaSymReader.PortablePdb": "1.2.0",
"Microsoft.DiaSymReader": "1.1.0",
"System.ValueTuple": "4.3.1"
},

Просмотреть файл

@ -17,9 +17,6 @@
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>

Просмотреть файл

@ -25,7 +25,7 @@
<dependency id="System.Linq.Queryable" version="4.0.1" />
<dependency id="System.Net.Requests" version="4.0.11" />
<dependency id="System.Reflection.Emit" version="4.0.1" />
<dependency id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
<dependency id="System.Reflection.Metadata" version="1.4.2" />
<dependency id="System.Runtime.InteropServices" version="4.1.0" />
<dependency id="System.Runtime.Loader" version="4.0.0" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.2.0" />
@ -33,16 +33,16 @@
<dependency id="System.Threading.Thread" version="4.0.0" />
<dependency id="System.Threading.ThreadPool" version="4.0.10" />
<dependency id="System.ValueTuple" version="4.3.1" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
<dependency id="Microsoft.DiaSymReader" version="1.0.8" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.2.0" />
<dependency id="Microsoft.DiaSymReader" version="1.1.0" />
</group>
</dependencies>
<contentFiles>
<files include="any/any/default.win32manifest" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any/any/Microsoft.FSharp.Targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any/any/Microsoft.Portable.FSharp.targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any/any/Microsoft.FSharp.NetSdk.targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any/any/Microsoft.FSharp.NetSdk.props" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any\any\default.win32manifest" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any\any\Microsoft.FSharp.Targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any\any\Microsoft.Portable.FSharp.targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any\any\Microsoft.FSharp.NetSdk.targets" buildAction="Content" copyToOutput="true" flatten="false" />
<files include="any\any\Microsoft.FSharp.NetSdk.props" buildAction="Content" copyToOutput="true" flatten="false" />
</contentFiles>
</metadata>
<files>
@ -54,16 +54,16 @@
tools, build and runtime/native make unnecessary copies.
this approach gives a very small deployment. Which is kind of necessary.
-->
<file src="fsc.exe" target="lib/netstandard1.6" />
<file src="fsi.exe" target="lib/netstandard1.6" />
<file src="FSharp.Core.dll" target="lib/netstandard1.6" />
<file src="FSharp.Compiler.Private.dll" target="lib/netstandard1.6" />
<file src="FSharp.Build.dll" target="lib/netstandard1.6" />
<file src="FSharp.Compiler.Interactive.Settings.dll" target="lib/netstandard1.6" />
<file src="default.win32manifest" target="contentFiles/any/any/" />
<file src="Microsoft.FSharp.Targets" target="contentFiles/any/any/" />
<file src="Microsoft.Portable.FSharp.Targets" target="contentFiles/any/any/" />
<file src="Microsoft.FSharp.NetSdk.targets" target="contentFiles/any/any/" />
<file src="Microsoft.FSharp.NetSdk.props" target="contentFiles/any/any/" />
<file src="fsc.exe" target="lib\netstandard1.6" />
<file src="fsi.exe" target="lib\netstandard1.6" />
<file src="FSharp.Core.dll" target="lib\netstandard1.6" />
<file src="FSharp.Compiler.Private.dll" target="lib\netstandard1.6" />
<file src="FSharp.Build.dll" target="lib\netstandard1.6" />
<file src="FSharp.Compiler.Interactive.Settings.dll" target="lib\netstandard1.6" />
<file src="default.win32manifest" target="contentFiles\any\any" />
<file src="Microsoft.FSharp.Targets" target="contentFiles\any\any" />
<file src="Microsoft.Portable.FSharp.Targets" target="contentFiles\any\any" />
<file src="Microsoft.FSharp.NetSdk.targets" target="contentFiles\any\any" />
<file src="Microsoft.FSharp.NetSdk.props" target="contentFiles\any\any" />
</files>
</package>

Просмотреть файл

@ -24,7 +24,7 @@
<dependency id="System.Linq.Queryable" version="4.0.1" />
<dependency id="System.Net.Requests" version="4.0.11" />
<dependency id="System.Reflection.Emit" version="4.0.1" />
<dependency id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
<dependency id="System.Reflection.Metadata" version="1.4.2" />
<dependency id="System.Runtime.InteropServices" version="4.1.0" />
<dependency id="System.Runtime.Loader" version="4.0.0" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.2.0" />
@ -32,8 +32,8 @@
<dependency id="System.Threading.Thread" version="4.0.0" />
<dependency id="System.Threading.ThreadPool" version="4.0.10" />
<dependency id="System.ValueTuple" version="4.3.1" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.1.0" />
<dependency id="Microsoft.DiaSymReader" version="1.0.8" />
<dependency id="Microsoft.DiaSymReader.PortablePdb" version="1.2.0" />
<dependency id="Microsoft.DiaSymReader" version="1.1.0" />
</group>
</dependencies>
</metadata>
@ -46,16 +46,16 @@
tools, build and runtime/native make unnecessary copies.
this approach gives a very small deployment. Which is kind of necessary.
-->
<file src="fsc.exe" target="lib/netstandard1.6" />
<file src="fsi.exe" target="lib/netstandard1.6" />
<file src="FSharp.Core.dll" target="lib/netstandard1.6" />
<file src="FSharp.Compiler.Private.dll" target="lib/netstandard1.6" />
<file src="FSharp.Build.dll" target="lib/netstandard1.6" />
<file src="FSharp.Compiler.Interactive.Settings.dll" target="lib/netstandard1.6" />
<file src="default.win32manifest" target="runtimes/any/native" />
<file src="Microsoft.FSharp.Targets" target="runtimes/any/native" />
<file src="Microsoft.Portable.FSharp.Targets" target="runtimes/any/native" />
<file src="Microsoft.FSharp.NetSdk.targets" target="runtimes/any/native" />
<file src="Microsoft.FSharp.NetSdk.props" target="runtimes/any/native" />
<file src="fsc.exe" target="lib\netstandard1.6" />
<file src="fsi.exe" target="lib\netstandard1.6" />
<file src="FSharp.Core.dll" target="lib\netstandard1.6" />
<file src="FSharp.Compiler.Private.dll" target="lib\netstandard1.6" />
<file src="FSharp.Build.dll" target="lib\netstandard1.6" />
<file src="FSharp.Compiler.Interactive.Settings.dll" target="lib\netstandard1.6" />
<file src="default.win32manifest" target="runtimes\any\native" />
<file src="Microsoft.FSharp.Targets" target="runtimes\any\native" />
<file src="Microsoft.Portable.FSharp.Targets" target="runtimes\any\native" />
<file src="Microsoft.FSharp.NetSdk.targets" target="runtimes\any\native" />
<file src="Microsoft.FSharp.NetSdk.props" target="runtimes\any\native" />
</files>
</package>

Просмотреть файл

@ -24,7 +24,7 @@
<NoWarn>$(NoWarn);217</NoWarn>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);EXTENSIONTYPING;$(TargetDotnetProfile.ToLower())</DefineConstants>
<DefineConstants>$(DefineConstants);$(TargetDotnetProfile.ToLower())</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -245,7 +245,8 @@ type ListType() =
Assert.AreEqual(lst.[6..], ([]: int list))
CheckThrowsIndexOutRangException((fun _ -> lst.[7..] |> ignore))
CheckThrowsIndexOutRangException((fun _ -> lst.[.. -1] |> ignore))
Assert.AreEqual(lst.[..(-1)], ([]: int list))
Assert.AreEqual(lst.[..0], [1])
Assert.AreEqual(lst.[..1], [1;2])
Assert.AreEqual(lst.[..2], [1;2;3])
@ -254,7 +255,16 @@ type ListType() =
Assert.AreEqual(lst.[..5], [1;2;3;4;5;6])
CheckThrowsIndexOutRangException((fun _ -> lst.[..6] |> ignore))
Assert.AreEqual(lst.[1..-1], ([]: int list))
Assert.AreEqual(lst.[0..(-1)], ([]: int list))
Assert.AreEqual(lst.[0..0], [1])
Assert.AreEqual(lst.[0..1], [1;2])
Assert.AreEqual(lst.[0..2], [1;2;3])
Assert.AreEqual(lst.[0..3], [1;2;3;4])
Assert.AreEqual(lst.[0..4], [1;2;3;4;5])
Assert.AreEqual(lst.[0..5], [1;2;3;4;5;6])
CheckThrowsIndexOutRangException((fun _ -> lst.[0..6] |> ignore))
Assert.AreEqual(lst.[1..(-1)], ([]: int list))
Assert.AreEqual(lst.[1..0], ([]: int list))
Assert.AreEqual(lst.[1..1], [2])
Assert.AreEqual(lst.[1..2], [2;3])
@ -270,8 +280,8 @@ type ListType() =
Assert.AreEqual(lst.[3..1], ([]: int list))
Assert.AreEqual(lst.[4..1], ([]: int list))
Assert.AreEqual(lst.[-3..-4], ([]: int list))
CheckThrowsIndexOutRangException((fun _ -> lst.[-4..-3] |> ignore))
Assert.AreEqual(lst.[-3..(-4)], ([]: int list))
CheckThrowsIndexOutRangException((fun _ -> lst.[-4..(-3)] |> ignore))
let empty : obj list = List.empty
Assert.AreEqual(empty.[*], ([]: obj list))

Просмотреть файл

@ -17,7 +17,7 @@
</dependencies>
</metadata>
<files>
<file src="lib/netstandard1.1/TupleSample.dll" target="lib/netstandard1.1" />
<file src="lib/portable-net40+sl4+win8+wp8/TupleSample.dll" target="lib/portable-net40+sl4+win8+wp8" />
<file src="lib\netstandard1.1\TupleSample.dll" target="lib\netstandard1.1" />
<file src="lib\portable-net40+sl4+win8+wp8\TupleSample.dll" target="lib\portable-net40+sl4+win8+wp8" />
</files>
</package>

Просмотреть файл

@ -71,56 +71,56 @@
</dependencies>
</metadata>
<files>
<file src="profiles/net20/FSharp.Core.dll" target="lib/net20/" />
<file src="profiles/net20/FSharp.Core.sigdata" target="lib/net20/" />
<file src="profiles/net20/FSharp.Core.optdata" target="lib/net20/" />
<file src="profiles/net20/FSharp.Core.xml" target="lib/net20/" />
<file src="profiles\net20\FSharp.Core.dll" target="lib\net20\" />
<file src="profiles\net20\FSharp.Core.sigdata" target="lib\net20\" />
<file src="profiles\net20\FSharp.Core.optdata" target="lib\net20\" />
<file src="profiles\net20\FSharp.Core.xml" target="lib\net20\" />
<file src="profiles/net40/FSharp.Core.dll" target="lib/net40/" />
<file src="profiles/net40/FSharp.Core.sigdata" target="lib/net40/" />
<file src="profiles/net40/FSharp.Core.optdata" target="lib/net40/" />
<file src="profiles/net40/FSharp.Core.xml" target="lib/net40/" />
<file src="profiles\net40\FSharp.Core.dll" target="lib\net40\" />
<file src="profiles\net40\FSharp.Core.sigdata" target="lib\net40\" />
<file src="profiles\net40\FSharp.Core.optdata" target="lib\net40\" />
<file src="profiles\net40\FSharp.Core.xml" target="lib\net40\" />
<file src="net40/bin/FSharp.Core.dll" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.sigdata" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.optdata" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.xml" target="lib/net45/" />
<file src="net40\bin\FSharp.Core.dll" target="lib\net45" />
<file src="net40\bin\FSharp.Core.sigdata" target="lib\net45" />
<file src="net40\bin\FSharp.Core.optdata" target="lib\net45" />
<file src="net40\bin\FSharp.Core.xml" target="lib\net45" />
<file src="coreclr/bin/FSharp.Core.dll" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.sigdata" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.optdata" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.xml" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.sigdata" target="runtimes/any/native/" />
<file src="coreclr/bin/FSharp.Core.optdata" target="runtimes/any/native/" />
<file src="coreclr\bin\FSharp.Core.dll" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.sigdata" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.optdata" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.xml" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.sigdata" target="runtimes\any\native" />
<file src="coreclr\bin\FSharp.Core.optdata" target="runtimes\any\native" />
<file src="profiles/portable-net45+monoandroid10+monotouch10+xamarinios10/FSharp.Core.dll" target="lib/portable-net45+monoandroid10+monotouch10+xamarinios10/" />
<file src="profiles/portable-net45+monoandroid10+monotouch10+xamarinios10/FSharp.Core.sigdata" target="lib/portable-net45+monoandroid10+monotouch10+xamarinios10/" />
<file src="profiles/portable-net45+monoandroid10+monotouch10+xamarinios10/FSharp.Core.optdata" target="lib/portable-net45+monoandroid10+monotouch10+xamarinios10/" />
<file src="profiles/portable-net45+monoandroid10+monotouch10+xamarinios10/FSharp.Core.xml" target="lib/portable-net45+monoandroid10+monotouch10+xamarinios10/" />
<file src="profiles\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll" target="lib\portable-net45+monoandroid10+monotouch10+xamarinios10" />
<file src="profiles\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.sigdata" target="lib\portable-net45+monoandroid10+monotouch10+xamarinios10" />
<file src="profiles\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.optdata" target="lib\portable-net45+monoandroid10+monotouch10+xamarinios10" />
<file src="profiles\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.xml" target="lib\portable-net45+monoandroid10+monotouch10+xamarinios10" />
<file src="profiles/portable-net45+netcore45/FSharp.Core.dll" target="lib/portable-net45+netcore45/" />
<file src="profiles/portable-net45+netcore45/FSharp.Core.sigdata" target="lib/portable-net45+netcore45/" />
<file src="profiles/portable-net45+netcore45/FSharp.Core.optdata" target="lib/portable-net45+netcore45/" />
<file src="profiles/portable-net45+netcore45/FSharp.Core.xml" target="lib/portable-net45+netcore45/" />
<file src="profiles\portable-net45+netcore45\FSharp.Core.dll" target="lib\portable-net45+netcore45" />
<file src="profiles\portable-net45+netcore45\FSharp.Core.sigdata" target="lib\portable-net45+netcore45" />
<file src="profiles\portable-net45+netcore45\FSharp.Core.optdata" target="lib\portable-net45+netcore45" />
<file src="profiles\portable-net45+netcore45\FSharp.Core.xml" target="lib\portable-net45+netcore45" />
<file src="profiles/portable-net45+netcore45+wp8/FSharp.Core.dll" target="lib/portable-net45+netcore45+wp8/" />
<file src="profiles/portable-net45+netcore45+wp8/FSharp.Core.sigdata" target="lib/portable-net45+netcore45+wp8/" />
<file src="profiles/portable-net45+netcore45+wp8/FSharp.Core.optdata" target="lib/portable-net45+netcore45+wp8/" />
<file src="profiles/portable-net45+netcore45+wp8/FSharp.Core.xml" target="lib/portable-net45+netcore45+wp8/" />
<file src="profiles\portable-net45+netcore45+wp8\FSharp.Core.dll" target="lib\portable-net45+netcore45+wp8" />
<file src="profiles\portable-net45+netcore45+wp8\FSharp.Core.sigdata" target="lib\portable-net45+netcore45+wp8" />
<file src="profiles\portable-net45+netcore45+wp8\FSharp.Core.optdata" target="lib\portable-net45+netcore45+wp8" />
<file src="profiles\portable-net45+netcore45+wp8\FSharp.Core.xml" target="lib\portable-net45+netcore45+wp8" />
<file src="profiles/portable-net45+netcore45+wpa81+wp8/FSharp.Core.dll" target="lib/portable-net45+netcore45+wpa81+wp8/" />
<file src="profiles/portable-net45+netcore45+wpa81+wp8/FSharp.Core.sigdata" target="lib/portable-net45+netcore45+wpa81+wp8/" />
<file src="profiles/portable-net45+netcore45+wpa81+wp8/FSharp.Core.optdata" target="lib/portable-net45+netcore45+wpa81+wp8/" />
<file src="profiles/portable-net45+netcore45+wpa81+wp8/FSharp.Core.xml" target="lib/portable-net45+netcore45+wpa81+wp8/" />
<file src="profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll" target="lib\portable-net45+netcore45+wpa81+wp8" />
<file src="profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.sigdata" target="lib\portable-net45+netcore45+wpa81+wp8" />
<file src="profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.optdata" target="lib\portable-net45+netcore45+wpa81+wp8" />
<file src="profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.xml" target="lib\portable-net45+netcore45+wpa81+wp8" />
<file src="profiles/portable-net45+sl5+netcore45/FSharp.Core.dll" target="lib/portable-net45+sl5+netcore45/" />
<file src="profiles/portable-net45+sl5+netcore45/FSharp.Core.sigdata" target="lib/portable-net45+sl5+netcore45/" />
<file src="profiles/portable-net45+sl5+netcore45/FSharp.Core.optdata" target="lib/portable-net45+sl5+netcore45/" />
<file src="profiles/portable-net45+sl5+netcore45/FSharp.Core.xml" target="lib/portable-net45+sl5+netcore45/" />
<file src="profiles\portable-net45+sl5+netcore45\FSharp.Core.dll" target="lib\portable-net45+sl5+netcore45" />
<file src="profiles\portable-net45+sl5+netcore45\FSharp.Core.sigdata" target="lib\portable-net45+sl5+netcore45" />
<file src="profiles\portable-net45+sl5+netcore45\FSharp.Core.optdata" target="lib\portable-net45+sl5+netcore45" />
<file src="profiles\portable-net45+sl5+netcore45\FSharp.Core.xml" target="lib\portable-net45+sl5+netcore45" />
<file src="profiles/xamarinmac20/FSharp.Core.dll" target="lib/xamarinmac20/" />
<file src="profiles/xamarinmac20/FSharp.Core.sigdata" target="lib/xamarinmac20/" />
<file src="profiles/xamarinmac20/FSharp.Core.optdata" target="lib/xamarinmac20/" />
<file src="profiles/xamarinmac20/FSharp.Core.xml" target="lib/xamarinmac20/" />
<file src="profiles\xamarinmac20\FSharp.Core.dll" target="lib\xamarinmac20" />
<file src="profiles\xamarinmac20\FSharp.Core.sigdata" target="lib\xamarinmac20" />
<file src="profiles\xamarinmac20\FSharp.Core.optdata" target="lib\xamarinmac20" />
<file src="profiles\xamarinmac20\FSharp.Core.xml" target="lib\xamarinmac20" />
</files>
</package>

Просмотреть файл

@ -52,15 +52,15 @@
</dependencies>
</metadata>
<files>
<file src="coreclr/bin/FSharp.Core.dll" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.sigdata" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.optdata" target="lib/netstandard1.6/" />
<file src="coreclr/bin/FSharp.Core.xml" target="lib/netstandard1.6/" />
<file src="coreclr\bin\FSharp.Core.dll" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.sigdata" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.optdata" target="lib\netstandard1.6" />
<file src="coreclr\bin\FSharp.Core.xml" target="lib\netstandard1.6" />
<file src="net40/bin/FSharp.Core.dll" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.sigdata" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.optdata" target="lib/net45/" />
<file src="net40/bin/FSharp.Core.xml" target="lib/net45/" />
<file src="net40\bin\FSharp.Core.dll" target="lib\net45" />
<file src="net40\bin\FSharp.Core.sigdata" target="lib\net45" />
<file src="net40\bin\FSharp.Core.optdata" target="lib\net45" />
<file src="net40\bin\FSharp.Core.xml" target="lib\net45" />
</files>
</package>

Просмотреть файл

@ -14,14 +14,14 @@
<dependencies></dependencies>
</metadata>
<files>
<file src="profiles/net20/**/**" target="lib/" />
<file src="profiles/net40/**/**" target="lib/" />
<file src="profiles/portable-net45+monoandroid10+monotouch10+xamarinios10/**/**" target="lib/" />
<file src="profiles/portable-net45+netcore45/**/**" target="lib/" />
<file src="profiles/portable-net45+netcore45+wp8/**/**" target="lib/" />
<file src="profiles/portable-net45+netcore45+wpa81+wp8/**/**" target="lib/" />
<file src="profiles/portable-net45+sl5+netcore45/**/**" target="lib/" />
<file src="profiles/xamarinmac20/**/**" target="lib/" />
<file src="profiles\net20\**\**" target="lib" />
<file src="profiles\net40\**\**" target="lib" />
<file src="profiles\portable-net45+monoandroid10+monotouch10+xamarinios10\**\**" target="lib" />
<file src="profiles\portable-net45+netcore45\**\**" target="lib" />
<file src="profiles\portable-net45+netcore45+wp8\**\**" target="lib" />
<file src="profiles\portable-net45+netcore45+wpa81+wp8\**\**" target="lib" />
<file src="profiles\portable-net45+sl5+netcore45\**\**" target="lib" />
<file src="profiles\xamarinmac20\**\**" target="lib" />
</files>
</package>

Просмотреть файл

@ -42,8 +42,8 @@
</dependencies>
</metadata>
<files>
<file src="FSharp.Core.dll" 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.dll" target="lib\netstandard1.6" />
<file src="FSharp.Core.xml" target="lib\netstandard1.6" />
<file src="FSharp.Core.runtimeconfig.json" target="lib\netstandard1.6" />
</files>
</package>

Просмотреть файл

@ -216,11 +216,10 @@ namespace Microsoft.FSharp.Collections
| [] -> state
| _ ->
let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(folder)
let rec loop s xs =
match xs with
| [] -> s
| h::t -> loop (f.Invoke(s,h)) t
loop state list
let mutable acc = state
for x in list do
acc <- f.Invoke(acc, x)
acc
[<CompiledName("Pairwise")>]
let pairwise (list: 'T list) =

Просмотреть файл

@ -3157,7 +3157,7 @@ namespace Microsoft.FSharp.Collections
// similar to 'take' but with n representing an index, not a number of elements
// and with exceptions matching array slicing
let sliceTake n l =
if n < 0 then outOfRange()
if n < 0 then [] else
match l with
| [] -> outOfRange()
| x::xs ->

Просмотреть файл

@ -11,6 +11,7 @@
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);62</NoWarn>
<AssemblyName>fsc-proto</AssemblyName>
<DefineConstants>NO_EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>BUILDING_PROTO;$(DefineConstants)</DefineConstants>
<DefineConstants>BUILDING_WITH_LKG;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
@ -453,7 +454,7 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
@ -472,7 +473,7 @@
<Name>FSharp.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' != 'true' ">
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr'">
<Reference Include="Microsoft.Build.Framework, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll</HintPath>
</Reference>
@ -486,23 +487,6 @@
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetDotnetProfile)' != 'coreclr' AND '$(MonoPackaging)' == 'true' ">
<Reference Include="Microsoft.Build.Framework, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.$(MonoPackagingMSBuildVersionSuffix), Version=$(MonoPackagingMSBuildVersionFull), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
<Import Project="$(FsLexToolPath)\FsLexYacc.targets" />
</Project>

Просмотреть файл

@ -18,7 +18,6 @@
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);62</NoWarn>
<AssemblyName>fsc</AssemblyName>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>

Просмотреть файл

@ -400,7 +400,7 @@ and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst =
if ptrsOK = PtrTypesOK && tyconRefEq g tcref g.nativeptr_tcr && (freeInTypes CollectTypars tinst).FreeTypars.IsEmpty then
GenNamedTyAppAux amap m tyenv ptrsOK g.ilsigptr_tcr tinst
else
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tcref.TypeReprInfo with
// Generate the base type, because that is always the representation of the erased type, unless the assembly is being injected
| TProvidedTypeExtensionPoint info when info.IsErased ->
@ -6179,7 +6179,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) =
let tcref = mkLocalTyconRef tycon
if tycon.IsTypeAbbrev then () else
match tycon.TypeReprInfo with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedNamespaceExtensionPoint _ -> ()
| TProvidedTypeExtensionPoint _ -> ()
#endif

Просмотреть файл

@ -53,7 +53,7 @@ let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ =
let minfos =
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
let meths =
@ -122,7 +122,7 @@ let GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ =
let pinfos =
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
let matchingProps =
@ -185,7 +185,7 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) =
let GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ =
let infos =
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
match optFilter with
@ -210,7 +210,7 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) =
let ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m typ =
let infos =
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
match optFilter with
@ -426,7 +426,7 @@ let GetIntrinsicConstructorInfosOfType (infoReader:InfoReader) m ty =
let amap = infoReader.amap
if isAppTy g ty then
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
[ for ci in st.PApplyArray((fun st -> st.GetConstructors()), "GetConstructors", m) do

Просмотреть файл

@ -27,7 +27,7 @@ open Microsoft.FSharp.Compiler.Tastops.DebugPrint
open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.TypeRelations
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -654,7 +654,7 @@ let MakeMethInfoCall amap m minfo minst args =
BuildFSharpMethodCall g m (typ,vref) valUseFlags minst args |> fst
| DefaultStructCtor(_,typ) ->
mkDefault (m,typ)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,m) ->
let isProp = false // not necessarily correct, but this is only used post-creflect where this flag is irrelevant
let ilMethodRef = Import.ImportProvidedMethodBaseAsILMethodRef amap m mi
@ -668,7 +668,7 @@ let MakeMethInfoCall amap m minfo minst args =
#endif
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// This imports a provided method, and checks if it is a known compiler intrinsic like "1 + 2"
let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap:Import.ImportMap, m:range, mbase: Tainted<ProvidedMethodBase>) =
let methodName = mbase.PUntaint((fun x -> x.Name),m)
@ -718,7 +718,7 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA
valUseFlags
match minfo with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// By this time this is an erased method info, e.g. one returned from an expression
// REVIEW: copied from tastops, which doesn't allow protected methods
| ProvidedMeth (amap,providedMeth,_,_) ->
@ -835,7 +835,7 @@ let CoerceFromFSharpFuncToDelegate g amap infoReader ad callerArgTy m callerArgE
//-------------------------------------------------------------------------
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// This file is not a great place for this functionality to sit, it's here because of BuildMethodCall
module ProvidedMethodCalls =

Просмотреть файл

@ -650,7 +650,7 @@ let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv,
// Note you only have to explicitly implement 'System.IComparable' to customize structural comparison AND equality on F# types
if isImplementation &&
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
not tycon.IsProvidedGeneratedTycon &&
#endif
Option.isNone tycon.GeneratedCompareToValues &&
@ -667,7 +667,7 @@ let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv,
AugmentWithHashCompare.CheckAugmentationAttribs isImplementation g amap tycon
// Check some conditions about generic comparison and hashing. We can only check this condition after we've done the augmentation
if isImplementation
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
&& not tycon.IsProvidedGeneratedTycon
#endif
then

Просмотреть файл

@ -27,7 +27,7 @@ open Microsoft.FSharp.Compiler.InfoReader
open Microsoft.FSharp.Compiler.PrettyNaming
open System.Collections.Generic
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -899,7 +899,9 @@ let AddResults res1 res2 =
| Result x,Exception _ -> Result x
// If we have error messages for the same symbol, then we can merge suggestions.
| Exception (UndefinedName(n1,f,id1,suggestions1)),Exception (UndefinedName(n2,_,id2,suggestions2)) when n1 = n2 && id1.idText = id2.idText && id1.idRange = id2.idRange ->
Exception(UndefinedName(n1,f,id1,fun () -> Set.union (suggestions1()) (suggestions2())))
let suggestions = HashSet(suggestions1())
suggestions.UnionWith(suggestions2())
Exception(UndefinedName(n1,f,id1,fun () -> suggestions))
// This prefers error messages coming from deeper failing long identifier paths
| Exception (UndefinedName(n1,_,_,_) as e1),Exception (UndefinedName(n2,_,_,_) as e2) ->
if n1 < n2 then Exception e2 else Exception e1
@ -1066,7 +1068,7 @@ type PermitDirectReferenceToGeneratedType =
| No
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Check for direct references to generated provided types.
let CheckForDirectReferenceToGeneratedType (tcref: TyconRef, genOk, m) =
@ -1141,7 +1143,7 @@ let LookupTypeNameInEntityMaybeHaveArity (amap, m, ad, nm, staticResInfo:TypeNam
match LookupTypeNameInEntityHaveArity nm staticResInfo mtyp with
| Some tycon -> [modref.NestedTyconRef tycon]
| None -> []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let tcrefs =
match tcrefs with
| [] -> ResolveProvidedTypeNameInEntity (amap, m, nm, modref)
@ -1171,7 +1173,7 @@ let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, chec
let tycon = tcref.Deref
let mty = tycon.ModuleOrNamespaceType
// No dotting through type generators to get to a nested type!
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
if checkForGenerated then
CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m)
#else
@ -1183,7 +1185,7 @@ let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, chec
let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, ad, nm, staticResInfo, tcref)
tcrefs |> List.map (MakeNestedType ncenv tinst m)
| None ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tycon.TypeReprInfo with
| TProvidedTypeExtensionPoint info ->
[ for nestedType in info.ProvidedType.PApplyArray((fun sty -> sty.GetNestedTypes()), "GetNestedTypes", m) do
@ -1727,7 +1729,7 @@ let CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities
| _ ->
tcrefs
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
for (_,tcref) in tcrefs do
// Type generators can't be returned by name resolution, unless PermitDirectReferenceToGeneratedType.Yes
CheckForDirectReferenceToGeneratedType (tcref, genOk, m)
@ -1761,23 +1763,23 @@ let rec ResolveLongIndentAsModuleOrNamespace atMostOne amap m fullyQualified (ne
|> Seq.collect (fun kv -> kv.Value)
|> Seq.filter (fun modref -> IsEntityAccessible amap m ad modref)
|> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName])
|> Set.ofSeq
|> HashSet
UndefinedName(0,FSComp.SR.undefinedNameNamespaceOrModule,id,suggestModulesAndNamespaces))
let moduleNotFoundErrorCache = ref None
let moduleNotFound (modref: ModuleOrNamespaceRef) (mty:ModuleOrNamespaceType) id depth =
match !moduleNotFoundErrorCache with
| Some error -> error
| None ->
let mutable moduleNotFoundErrorCache = None
let moduleNotFound (modref: ModuleOrNamespaceRef) (mty:ModuleOrNamespaceType) (id:Ident) depth =
match moduleNotFoundErrorCache with
| Some (oldId, error) when oldId = id.idRange -> error
| _ ->
let suggestNames() =
mty.ModulesAndNamespacesByDemangledName
|> Seq.filter (fun kv -> IsEntityAccessible amap m ad (modref.NestedTyconRef kv.Value))
|> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName])
|> Set.ofSeq
|> HashSet
let error = raze (UndefinedName(depth,FSComp.SR.undefinedNameNamespace,id,suggestNames))
moduleNotFoundErrorCache := Some error
moduleNotFoundErrorCache <- Some(id.idRange, error)
error
match moduleOrNamespaces.TryFind id.idText with
@ -1931,7 +1933,7 @@ let SelectMethInfosFromExtMembers (infoReader:InfoReader) optFilter apparentTy m
// F#-defined IL-style extension methods are not seen as extension methods in F# code
| FSMeth(g,_,vref,_) ->
yield (FSMeth(g, apparentTy, vref, Some pri))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// // Provided extension methods are not yet supported
| ProvidedMeth(amap,providedMeth,_,m) ->
yield (ProvidedMeth(amap, providedMeth, Some pri,m))
@ -1989,7 +1991,7 @@ let CoreDisplayName(pinfo:PropInfo) =
| FSProp(_,_,Some get,_) -> get.CoreDisplayName
| FSProp _ -> failwith "unexpected (property must have either getter or setter)"
| ILProp(_,ILPropInfo(_,def)) -> def.Name
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.Name), m)
#endif
@ -2014,16 +2016,13 @@ let DecodeFSharpEvent (pinfos:PropInfo list) ad g (ncenv:NameResolver) m =
/// Returns all record label names for the given type.
let GetRecordLabelsForType g nenv typ =
let result = HashSet()
if isRecdTy g typ then
let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv typ
nenv.eFieldLabels
|> Seq.filter (fun kv ->
kv.Value
|> List.exists (fun r -> r.TyconRef.DisplayName = typeName))
|> Seq.map (fun kv -> kv.Key)
|> Set.ofSeq
else
Set.empty
let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv typ
for KeyValue(k, v) in nenv.eFieldLabels do
if v |> List.exists (fun r -> r.TyconRef.DisplayName = typeName) then
result.Add k |> ignore
result
// REVIEW: this shows up on performance logs. Consider for example endless resolutions of "List.map" to
// the empty set of results, or "x.Length" for a list or array type. This indicates it could be worth adding a cache here.
@ -2112,21 +2111,22 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo
let suggestions1 =
ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) m typ
|> List.map (fun p -> p.PropertyName)
|> Set.ofList
let suggestions2 =
ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv None m typ
|> List.map (fun m -> m.DisplayName)
|> Set.ofList
let suggestions3 =
GetIntrinsicPropInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m typ
|> List.map (fun p -> p.PropertyName)
|> Set.ofList
let suggestions4 =
GetIntrinsicMethInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m typ
|> List.filter (fun m -> not m.IsClassConstructor && not m.IsConstructor)
|> List.map (fun m -> m.DisplayName)
|> Set.ofList
let suggestions5 = GetRecordLabelsForType g nenv typ
let suggestions6 =
match lookupKind with
| LookupKind.Expr | LookupKind.Pattern ->
@ -2134,17 +2134,17 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo
let tcref,_ = destAppTy g typ
tcref.UnionCasesArray
|> Array.map (fun uc -> uc.DisplayName)
|> Set.ofArray
else
Set.empty
| _ -> Set.empty
[||]
| _ -> [||]
suggestions1
|> Set.union suggestions2
|> Set.union suggestions3
|> Set.union suggestions4
|> Set.union suggestions5
|> Set.union suggestions6
[ yield! suggestions1
yield! suggestions2
yield! suggestions3
yield! suggestions4
yield! suggestions5
yield! suggestions6 ]
|> HashSet
raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id, suggestMembers))
@ -2164,7 +2164,7 @@ let ResolveLongIdentInType sink ncenv nenv lookupKind m ad lid findFlag typeName
item,rest
let private ResolveLongIdentInTyconRef (ncenv:NameResolver) nenv lookupKind resInfo depth m ad lid typeNameResInfo tcref =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// No dotting through type generators to get to a member!
CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m)
#endif
@ -2259,13 +2259,11 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN
modref.ModuleOrNamespaceType.AllEntities
|> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef e))
|> Seq.map (fun e -> e.DisplayName)
|> Set.ofSeq
let submodules =
mty.ModulesAndNamespacesByDemangledName
|> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value))
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
let unions =
modref.ModuleOrNamespaceType.AllEntities
@ -2276,25 +2274,23 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN
else
tycon.UnionCasesArray)
|> Seq.map (fun uc -> uc.DisplayName)
|> Set.ofSeq
let vals =
modref.ModuleOrNamespaceType.AllValsByLogicalName
|> Seq.filter (fun e -> IsValAccessible ad (mkNestedValRef modref e.Value))
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
let exns =
modref.ModuleOrNamespaceType.ExceptionDefinitionsByDemangledName
|> Seq.filter (fun e -> IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef e.Value))
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
types
|> Set.union submodules
|> Set.union unions
|> Set.union vals
|> Set.union exns
[ yield! types
yield! submodules
yield! unions
yield! vals
yield! exns ]
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameValueConstructorNamespaceOrType,id,suggestPossibleTypesAndNames))
| results -> AtMostOneResult id.idRange results
@ -2393,20 +2389,17 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) fullyQualified m ad n
let suggestedNames =
nenv.eUnqualifiedItems
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
let suggestedTypes =
nenv.TyconsByDemangledNameAndArity fullyQualified
|> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value)
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
let suggestedModulesAndNamespaces =
nenv.ModulesAndNamespaces fullyQualified
|> Seq.collect (fun kv -> kv.Value)
|> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref)
|> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName])
|> Set.ofSeq
let unions =
// check if the user forgot to use qualified access
@ -2421,12 +2414,12 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) fullyQualified m ad n
else
None)
|> Seq.map (fun t -> t.DisplayName + "." + id.idText)
|> Set.ofSeq
suggestedNames
|> Set.union suggestedTypes
|> Set.union suggestedModulesAndNamespaces
|> Set.union unions
[ yield! suggestedNames
yield! suggestedTypes
yield! suggestedModulesAndNamespaces
yield! unions ]
|> HashSet
raze (UndefinedName(0,FSComp.SR.undefinedNameValueOfConstructor,id,suggestNamesAndTypes))
ForceRaise failingCase
@ -2514,33 +2507,28 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) fullyQualified m ad n
search +++ moduleSearch +++ tyconSearch
let suggestEverythingInScope() =
let suggestedModulesAndNamespaces =
nenv.ModulesAndNamespaces fullyQualified
|> Seq.collect (fun kv -> kv.Value)
|> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref)
|> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName])
|> Set.ofSeq
seq { yield!
nenv.ModulesAndNamespaces fullyQualified
|> Seq.collect (fun kv -> kv.Value)
|> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref)
|> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName])
let suggestedTypes =
nenv.TyconsByDemangledNameAndArity fullyQualified
|> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value)
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
yield!
nenv.TyconsByDemangledNameAndArity fullyQualified
|> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value)
|> Seq.map (fun e -> e.Value.DisplayName)
let suggestedNames =
nenv.eUnqualifiedItems
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
suggestedNames
|> Set.union suggestedTypes
|> Set.union suggestedModulesAndNamespaces
yield!
nenv.eUnqualifiedItems
|> Seq.map (fun e -> e.Value.DisplayName)
} |> HashSet
match innerSearch with
| Exception (UndefinedName(0,_,id1,suggestionsF)) when id.idRange = id1.idRange ->
let mergeSuggestions() =
suggestEverythingInScope()
|> Set.union (suggestionsF())
let res = suggestEverythingInScope()
res.UnionWith(suggestionsF())
res
let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,mergeSuggestions))
ForceRaise failingCase
@ -2635,15 +2623,15 @@ let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv num
mty.ModulesAndNamespacesByDemangledName
|> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value))
|> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName])
|> Set.ofSeq
let suggestedTypes =
nenv.TyconsByDemangledNameAndArity FullyQualifiedFlag.OpenQualified
|> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value)
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
Set.union submodules suggestedTypes
[ yield! submodules
yield! suggestedTypes ]
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameConstructorModuleOrNamespace,id,suggestPossibleTypes))
| results -> AtMostOneResult id.idRange results
@ -2732,7 +2720,7 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo
match lid with
| [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m))
| [id] ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// No dotting through type generators to get to a nested type!
CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m)
#endif
@ -2746,11 +2734,11 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo
let suggestTypes() =
tcref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes))
| id::rest ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// No dotting through type generators to get to a nested type!
CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m)
#endif
@ -2767,7 +2755,7 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo
let suggestTypes() =
tcref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes))
@ -2787,7 +2775,7 @@ let SuggestTypeLongIdentInModuleOrNamespace depth (modref:ModuleOrNamespaceRef)
modref.ModuleOrNamespaceType.AllEntities
|> Seq.filter (fun e -> IsEntityAccessible amap m ad (modref.NestedTyconRef e))
|> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName])
|> Set.ofSeq
|> HashSet
let errorTextF s = FSComp.SR.undefinedNameTypeIn(s,fullDisplayTextOfModRef modref)
UndefinedName(depth,errorTextF,id,suggestPossibleTypes)
@ -2814,7 +2802,7 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) (ty
modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName
|> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value))
|> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName])
|> Set.ofSeq
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameNamespaceOrModule,id,suggestPossibleModules))
let tyconSearch =
@ -2825,7 +2813,7 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) (ty
let suggestTypes() =
modref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange
|> Seq.map (fun e -> e.Value.DisplayName)
|> Set.ofSeq
|> HashSet
raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes))
tyconSearch +++ modulSearch
@ -2868,7 +2856,7 @@ let rec ResolveTypeLongIdentPrim (ncenv:NameResolver) occurence fullyQualified m
if e.Value.DisplayName.EndsWith "Attribute" then
yield e.Value.DisplayName.Replace("Attribute","")]
| _ -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName])
|> Set.ofSeq
|> HashSet
raze (UndefinedName(0,FSComp.SR.undefinedNameType,id,suggestPossibleTypes))
@ -2991,18 +2979,19 @@ let SuggestOtherLabelsOfSameRecordType g (nenv:NameResolutionEnv) typ (id:Ident)
allFields
|> List.map (fun fld -> fld.idText)
|> List.filter ((<>) id.idText)
|> Set.ofList
Set.difference labelsOfPossibleRecord givenFields
labelsOfPossibleRecord.ExceptWith givenFields
labelsOfPossibleRecord
let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFields:Ident list) =
let suggestLabels() =
let givenFields = allFields |> List.map (fun fld -> fld.idText) |> List.filter ((<>) id.idText) |> Set.ofList
let givenFields = allFields |> List.map (fun fld -> fld.idText) |> List.filter ((<>) id.idText) |> HashSet
let fullyQualfied =
if Set.isEmpty givenFields then
if givenFields.Count = 0 then
// return labels from all records
NameMap.domainL nenv.eFieldLabels |> Set.ofList |> Set.remove "contents"
let result = NameMap.domainL nenv.eFieldLabels |> HashSet
result.Remove "contents" |> ignore
result
else
let possibleRecords =
[for fld in givenFields do
@ -3010,10 +2999,10 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel
| None -> ()
| Some recordTypes -> yield! (recordTypes |> List.map (fun r -> r.TyconRef.DisplayName, fld)) ]
|> List.groupBy fst
|> List.map (fun (r,fields) -> r, fields |> List.map snd |> Set.ofList)
|> List.filter (fun (_,fields) -> Set.isSubset givenFields fields)
|> List.map (fun (r,fields) -> r, fields |> List.map snd)
|> List.filter (fun (_,fields) -> givenFields.IsSubsetOf fields)
|> List.map fst
|> Set.ofList
|> HashSet
let labelsOfPossibleRecords =
nenv.eFieldLabels
@ -3022,11 +3011,12 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel
|> List.map (fun r -> r.TyconRef.DisplayName)
|> List.exists possibleRecords.Contains)
|> Seq.map (fun kv -> kv.Key)
|> Set.ofSeq
|> HashSet
Set.difference labelsOfPossibleRecords givenFields
labelsOfPossibleRecords.ExceptWith givenFields
labelsOfPossibleRecords
if not (Set.isEmpty fullyQualfied) then fullyQualfied else
if fullyQualfied.Count > 0 then fullyQualfied else
// check if the user forgot to use qualified access
nenv.eTyconsByDemangledNameAndArity
@ -3040,7 +3030,7 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel
else
None)
|> Seq.map (fun t -> t.DisplayName + "." + id.idText)
|> Set.ofSeq
|> HashSet
UndefinedName(0,FSComp.SR.undefinedNameRecordLabel, id, suggestLabels)
@ -3575,7 +3565,7 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso
if addersAndRemovers.IsEmpty then minfos
else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Filter out the ones with mangled names from applying static parameters
let minfos =
let methsWithStaticParams =
@ -4201,7 +4191,7 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ
if addersAndRemovers.IsEmpty then minfos
else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Filter out the ones with mangled names from applying static parameters
let minfos =
let methsWithStaticParams =

Просмотреть файл

@ -27,7 +27,7 @@ open Microsoft.FSharp.Compiler.PrettyNaming
open Microsoft.FSharp.Core.Printf
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
open Microsoft.FSharp.Core.CompilerServices
#endif
@ -1370,7 +1370,7 @@ module InfoMemberPrinting =
let prettyTyparInst, prettyMethInfo, minst = prettifyILMethInfo amap m methInfo typarInst ilminfo
let resL = layoutMethInfoCSharpStyle amap m denv prettyMethInfo minst
prettyTyparInst, resL
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ ->
let prettyTyparInst, _ = PrettyTypes.PrettifyInst amap.g typarInst
prettyTyparInst, layoutMethInfoCSharpStyle amap m denv methInfo methInfo.FormalMethodInst
@ -1469,7 +1469,7 @@ module private TastDefinitionPrinting =
| TAsmRepr _
| TILObjectRepr _
| TMeasureableRepr _
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint _
| TProvidedNamespaceExtensionPoint _
#endif
@ -1477,7 +1477,7 @@ module private TastDefinitionPrinting =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let private layoutILFieldInfo denv amap m (e: ILFieldInfo) =
let staticL = if e.IsStatic then WordL.keywordStatic else emptyL
let nameL = wordL (tagField (adjustILName e.FieldName))
@ -1642,7 +1642,7 @@ module private TastDefinitionPrinting =
let tpsL = layoutTyparDecls denv nameL tycon.IsPrefixDisplay tps
typewordL ^^ tpsL
let start = Option.map tagKeyword start
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tycon.IsProvided with
| true ->
layoutProvidedTycon denv infoReader ad m start lhsL ty

Просмотреть файл

@ -1379,7 +1379,7 @@ let CheckRecdField isUnion cenv env (tycon:Tycon) (rfield:RecdField) =
CheckForByrefLikeType cenv env rfield.FormalType (fun () -> errorR(Error(FSComp.SR.chkCantStoreByrefValue(), tycon.Range)))
let CheckEntityDefn cenv env (tycon:Entity) =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
if not tycon.IsProvidedGeneratedTycon then
#endif
let env = { env with reflect = env.reflect || HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute tycon.Attribs }

Просмотреть файл

@ -802,7 +802,7 @@ and ConvType cenv env m typ =
| TType_ucase(UCRef(tcref,_),tyargs) // Note: we erase union case 'types' when converting to quotations
| TType_app(tcref,tyargs) ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match TryElimErasableTyconRef cenv m tcref with
| Some baseTy -> ConvType cenv env m baseTy
| _ ->
@ -926,7 +926,7 @@ and ConvDecisionTree cenv env tgs typR x =
and IsILTypeRefStaticLinkLocal cenv m (tr:ILTypeRef) =
ignore cenv; ignore m
match tr.Scope with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ILScopeRef.Assembly aref
when not cenv.g.isInteractive &&
aref.Name <> cenv.g.ilg.primaryAssemblyName && // optimization to avoid this check in the common case
@ -985,7 +985,7 @@ and ConvILType cenv env m ty =
| ILType.FunctionPointer _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainThisType(), m))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
and TryElimErasableTyconRef cenv m (tcref:TyconRef) =
match tcref.TypeReprInfo with
// Get the base type
@ -994,7 +994,7 @@ and TryElimErasableTyconRef cenv m (tcref:TyconRef) =
#endif
and ConvTyconRef cenv (tcref:TyconRef) m =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match TryElimErasableTyconRef cenv m tcref with
| Some baseTy -> ConvTyconRef cenv (tcrefOfAppTy cenv.g baseTy) m
| None ->

Просмотреть файл

@ -17,7 +17,7 @@ open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.Lib
open Microsoft.FSharp.Compiler.Infos
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -446,7 +446,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) =
| (TRecdRepr _
| TUnionRepr _
| TILObjectRepr _
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint _
| TProvidedNamespaceExtensionPoint _
#endif
@ -498,7 +498,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) =
| (TMeasureableRepr ty1), (TMeasureableRepr ty2) ->
if typeAEquiv g aenv ty1 ty2 then true else (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false)
| TNoRepr, TNoRepr -> true
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint info1 , TProvidedTypeExtensionPoint info2 ->
Tainted.EqTainted info1.ProvidedType.TypeProvider info2.ProvidedType.TypeProvider && ProvidedType.TaintedEquals(info1.ProvidedType,info2.ProvidedType)
| TProvidedNamespaceExtensionPoint _, TProvidedNamespaceExtensionPoint _ ->

Просмотреть файл

@ -22,7 +22,7 @@ open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.Layout
open Microsoft.FSharp.Compiler.Layout.TaggedTextOps
open Microsoft.FSharp.Compiler.PrettyNaming
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -627,14 +627,14 @@ let reduceTyconRefAbbrev (tcref:TyconRef) tyargs =
reduceTyconAbbrev tcref.Deref tyargs
let reduceTyconMeasureableOrProvided (g:TcGlobals) (tycon:Tycon) tyargs =
#if !EXTENSIONTYPING
#if NO_EXTENSIONTYPING
ignore g // otherwise g would be unused
#endif
let repr = tycon.TypeReprInfo
match repr with
| TMeasureableRepr ty ->
if isNil tyargs then ty else instType (mkTyconInst tycon tyargs) ty
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint info when info.IsErased -> info.BaseTypeForErased (range0, g.obj_ty)
#endif
| _ -> invalidArg "tc" "this type definition is not a refinement"
@ -921,7 +921,7 @@ let measureEquiv g m1 m2 = measureAEquiv g TypeEquivEnv.Empty m1 m2
let isErasedType g ty =
match stripTyEqns g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TType_app (tcref, _) -> tcref.IsProvidedErasedTycon
#endif
| _ -> false
@ -1516,19 +1516,19 @@ let isILAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) ->
let isNativePtrTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.nativeptr_tcr tcref | _ -> false)
let isByrefTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.byref_tcr tcref | _ -> false)
let isByrefLikeTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isByrefLikeTyconRef g tcref | _ -> false)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let extensionInfoOfTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.TypeReprInfo | _ -> TNoRepr)
#endif
type TypeDefMetadata =
| ILTypeMetadata of TILObjectReprData
| FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata of TProvidedTypeInfo
#endif
let metadataOfTycon (tycon:Tycon) =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tycon.TypeReprInfo with
| TProvidedTypeExtensionPoint info -> ProvidedTypeMetadata info
| _ ->
@ -1540,7 +1540,7 @@ let metadataOfTycon (tycon:Tycon) =
let metadataOfTy g ty =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match extensionInfoOfTy g ty with
| TProvidedTypeExtensionPoint info -> ProvidedTypeMetadata info
| _ ->
@ -1554,7 +1554,7 @@ let metadataOfTy g ty =
let isILReferenceTy g ty =
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> not info.IsStructOrEnum
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> not td.IsStructOrEnum
@ -1562,7 +1562,7 @@ let isILReferenceTy g ty =
let isILInterfaceTycon (tycon:Tycon) =
match metadataOfTycon tycon with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> info.IsInterface
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Interface)
@ -1594,7 +1594,7 @@ let isFSharpInterfaceTy g ty =
let isDelegateTy g ty =
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> info.IsDelegate ()
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Delegate)
@ -1605,7 +1605,7 @@ let isDelegateTy g ty =
let isInterfaceTy g ty =
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> info.IsInterface
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Interface)
@ -1613,7 +1613,7 @@ let isInterfaceTy g ty =
let isClassTy g ty =
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> info.IsClass
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Class)
@ -2781,7 +2781,7 @@ let TryFindILAttributeOpt attr attrs =
let TryBindTyconRefAttribute g (m:range) (AttribInfo (atref, _) as args) (tcref:TyconRef) f1 f2 f3 =
ignore m; ignore f3
match metadataOfTycon tcref.Deref with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)), m)
match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)), m) with
@ -3394,7 +3394,7 @@ module DebugPrint = begin
| _ -> failwith "unreachable"
let reprL =
match tycon.TypeReprInfo with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint _
| TProvidedNamespaceExtensionPoint _
#endif
@ -4443,7 +4443,7 @@ let InferArityOfExprBinding g allowTypeDirectedDetupling (v:Val) e =
let underlyingTypeOfEnumTy (g: TcGlobals) typ =
assert(isEnumTy g typ)
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info -> info.UnderlyingTypeOfEnum()
#endif
| ILTypeMetadata (TILObjectReprData(_, _, tdef)) ->
@ -4885,7 +4885,7 @@ and remapTyconRepr g tmenv repr =
| TRecdRepr x -> TRecdRepr (remapRecdFields g tmenv x)
| TUnionRepr x -> TUnionRepr (remapUnionCases g tmenv x)
| TILObjectRepr _ -> failwith "cannot remap IL type definitions"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedNamespaceExtensionPoint _ -> repr
| TProvidedTypeExtensionPoint info ->
TProvidedTypeExtensionPoint
@ -6324,7 +6324,7 @@ let mkCompilationMappingAttrForQuotationResource (g:TcGlobals) (nm, tys: ILTypeR
[ ILAttribElem.String (Some nm); ILAttribElem.Array (g.ilg.typ_Type, [ for ty in tys -> ILAttribElem.TypeRef (Some ty) ]) ],
[])
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
//----------------------------------------------------------------------------
// Decode extensible typing attributes
//----------------------------------------------------------------------------
@ -7319,7 +7319,7 @@ let isSealedTy g ty =
isArrayTy g ty ||
match metadataOfTy g ty with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata st -> st.IsSealed
#endif
| ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsSealed

Просмотреть файл

@ -19,7 +19,7 @@ open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.Layout
open Microsoft.FSharp.Compiler.Lib
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -993,7 +993,7 @@ val mkPrintfFormatTy : TcGlobals -> TType -> TType -> TType -> TType -> TType ->
type TypeDefMetadata =
| ILTypeMetadata of TILObjectReprData
| FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata of TProvidedTypeInfo
#endif
@ -1286,7 +1286,7 @@ val TyconRefHasAttribute : TcGlobals -> range -> BuiltinAttribInfo -> TyconRef -
/// Try to find the AttributeUsage attribute, looking for the value of the AllowMultiple named parameter
val TryFindAttributeUsageAttribute : TcGlobals -> range -> TyconRef -> bool option
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// returns Some(assemblyName) for success
val TryDecodeTypeProviderAssemblyAttr : ILGlobals -> ILAttribute -> string option
#endif

Просмотреть файл

@ -665,7 +665,7 @@ let u_encoded_nleref = u_tup2 u_int (u_array u_int)
let u_nleref st = lookup_uniq st st.inlerefs (u_int st)
let encode_nleref ccuTab stringTab nlerefTab thisCcu (nleref: NonLocalEntityRef) =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Remap references to statically-linked Entity nodes in provider-generated entities to point to the current assembly.
// References to these nodes _do_ appear in F# assembly metadata, because they may be public.
let nleref =
@ -1646,7 +1646,7 @@ and p_tycon_repr x st =
| TFSharpObjectRepr r -> p_byte 1 st; p_byte 3 st; p_tycon_objmodel_data r st; false
| TMeasureableRepr ty -> p_byte 1 st; p_byte 4 st; p_typ ty st; false
| TNoRepr -> p_byte 0 st; false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| TProvidedTypeExtensionPoint info ->
if info.IsErased then
// Pickle erased type definitions as a NoRepr

Просмотреть файл

@ -40,7 +40,7 @@ open Microsoft.FSharp.Compiler.NameResolution
open Microsoft.FSharp.Compiler.PrettyNaming
open Microsoft.FSharp.Compiler.InfoReader
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -449,10 +449,24 @@ let OpenModulesOrNamespaces tcSink g amap scopem root env mvvs openDeclaration =
CallOpenDeclarationSink tcSink openDeclaration
match openDeclaration.Range with
| None -> ()
| Some range ->
for modul in mvvs do
let item = Item.ModuleOrNamespaces [modul]
CallNameResolutionSink tcSink (range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights)
| Some _ ->
let rec loop (acc: (Item * range) list) (idents: Ident list) =
match idents with
| [] -> acc
| [id] when id.idText = MangledGlobalName -> acc
| id :: rest ->
let idents = List.rev idents
let range = id.idRange
let acc =
match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults amap range OpenQualified env.NameEnv env.eAccessRights idents with
| Result modrefs ->
(acc, modrefs) ||> List.fold (fun acc (_, modref, _) ->
(Item.ModuleOrNamespaces [modref], range) :: acc)
| _ -> acc
loop acc rest
for item, range in loop [] (List.rev openDeclaration.LongId) do
CallNameResolutionSink tcSink (range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights)
env
let AddRootModuleOrNamespaceRefs g amap m env modrefs =
@ -665,11 +679,11 @@ let LocateEnv ccu env enclosingNamespacePath =
env
let BuildRootModuleType enclosingNamespacePath (cpath:CompilationPath) mtyp =
(enclosingNamespacePath, (cpath, (mtyp, None)))
||> List.foldBack (fun id (cpath, (mtyp, mspec)) ->
(enclosingNamespacePath, (cpath, (mtyp, [])))
||> List.foldBack (fun id (cpath, (mtyp, mspecs)) ->
let a, b = wrapModuleOrNamespaceTypeInNamespace id cpath.ParentCompPath mtyp
cpath.ParentCompPath, (a, match mspec with Some _ -> mspec | None -> Some b))
|> snd
cpath.ParentCompPath, (a, b :: mspecs))
|> fun (_, (mtyp, mspecs)) -> mtyp, List.rev mspecs
let BuildRootModuleExpr enclosingNamespacePath (cpath:CompilationPath) mexpr =
(enclosingNamespacePath, (cpath, mexpr))
@ -3016,7 +3030,7 @@ let BuildPossiblyConditionalMethodCall cenv env isMutable m isProp minfo valUseF
mkUnit cenv.g m, cenv.g.unit_ty
| _ ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match minfo with
| ProvidedMeth(_, mi, _, _) ->
// BuildInvokerExpressionForProvidedMethodCall converts references to F# intrinsics back to values
@ -3080,7 +3094,7 @@ let BuildILFieldGet g amap m objExpr (finfo:ILFieldInfo) =
let valu = if isValueType then AsValue else AsObject
let tinst = finfo.TypeInst
let fieldType = finfo.FieldType (amap, m)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let ty = tyOfExpr g objExpr
match finfo with
| ProvidedField _ when (isErasedType g ty) ->
@ -4458,16 +4472,16 @@ and TcTyparOrMeasurePar optKind cenv (env:TcEnv) newOk tpenv (Typar(id, _, _) as
let predictions1 =
env.eNameResEnv.eTypars
|> Seq.map (fun p -> "'" + p.Key)
|> Set.ofSeq
let predictions2 =
match tpenv with
| UnscopedTyparEnv elements ->
elements
|> Seq.map (fun p -> "'" + p.Key)
|> Set.ofSeq
Set.union predictions1 predictions2
[ yield! predictions1
yield! predictions2 ]
|> HashSet
let reportedId = Ident("'" + id.idText, id.idRange)
error (UndefinedName(0, FSComp.SR.undefinedNameTypeParameter, reportedId, predictTypeParameters))
@ -4719,7 +4733,7 @@ and TcTyparConstraints cenv newOk checkCxs occ env tpenv wcs =
let _, tpenv = List.fold (fun (ridx, tpenv) tc -> ridx - 1, TcTyparConstraint ridx cenv newOk checkCxs occ env tpenv tc) (List.length wcs - 1, tpenv) wcs
tpenv
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
and TcStaticConstantParameter cenv (env:TcEnv) tpenv kind (v:SynType) idOpt container =
let fail() = error(Error(FSComp.SR.etInvalidStaticArgument(NicePrint.minimalStringOfType env.DisplayEnv kind), v.Range))
let record ttype =
@ -4908,7 +4922,7 @@ and TcTypeApp cenv newOk checkCxs occ env tpenv m tcref pathTypeArgs (synArgTys:
CheckTyconAccessible cenv.amap m env.eAccessRights tcref |> ignore
CheckEntityAttributes cenv.g tcref m |> CommitOperationResult
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Provided types are (currently) always non-generic. Their names may include mangled
// static parameters, which are passed by the provider.
if tcref.Deref.IsProvided then TcProvidedTypeApp cenv env tpenv tcref synArgTys m else
@ -6440,7 +6454,7 @@ and FreshenObjExprAbstractSlot cenv (env: TcEnv) (implty:TType) virtNameAndArity
let suggestVirtualMembers() =
virtNameAndArityPairs
|> List.map (fst >> fst)
|> Set.ofList
|> HashSet
if containsNonAbstractMemberWithSameName then
errorR(ErrorWithSuggestions(FSComp.SR.tcMemberFoundIsNotAbstractOrVirtual(tcref.DisplayName, bindName), mBinding, bindName, suggestVirtualMembers))
@ -8623,7 +8637,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del
| (DelayedTypeApp(tys, mTypeArgs, mExprAndTypeArgs) :: otherDelayed) ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match TryTcMethodAppToStaticConstantArgs cenv env tpenv (minfos, Some (tys, mTypeArgs), mExprAndTypeArgs, mItem) with
| Some minfoAfterStaticArguments ->
@ -8654,7 +8668,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del
TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndTypeArgs mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic otherDelayed
| _ ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
if not minfos.IsEmpty && minfos.[0].ProvidedStaticParameterInfo.IsSome then
error(Error(FSComp.SR.etMissingStaticArgumentsToMethod(), mItem))
#endif
@ -8676,7 +8690,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del
let objTyAfterTyArgs, tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs objTy tyargs
CallExprHasTypeSink cenv.tcSink (mExprAndArg, env.NameEnv, objTyAfterTyArgs, env.DisplayEnv, env.eAccessRights)
let itemAfterTyArgs, minfosAfterTyArgs =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// If the type is provided and took static arguments then the constructor will have changed
// to a provided constructor on the statically instantiated type. Re-resolve that constructor.
match objTyAfterTyArgs with
@ -9039,7 +9053,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela
// To get better warnings we special case some of the few known mutate-a-struct method names
let mutates = (if methodName = "MoveNext" || methodName = "GetNextArg" then DefinitelyMutates else PossiblyMutates)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match TryTcMethodAppToStaticConstantArgs cenv env tpenv (minfos, tyargsOpt, mExprAndItem, mItem) with
| Some minfoAfterStaticArguments ->
// Replace the resolution including the static parameters, plus the extra information about the original method info
@ -14703,7 +14717,7 @@ module EstablishTypeDefinitionCores =
tycon.entity_tycon_repr <- repr
attrs, getFinalAttrs
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Get the items on the r.h.s. of a 'type X = ABC<...>' definition
let private TcTyconDefnCore_GetGenerateDeclaration_Rhs rhsType =
match rhsType with
@ -14926,7 +14940,7 @@ module EstablishTypeDefinitionCores =
| SynTypeDefnSimpleRepr.TypeAbbrev(ParserDetail.Ok, rhsType, m) ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Check we have not already decided that this is a generative provided type definition. If we have already done this (i.e. this is the second pass
// for a generative provided type definition, then there is no more work to do).
if (match tycon.entity_tycon_repr with TNoRepr -> true | _ -> false) then
@ -16383,7 +16397,13 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS
// For 'namespace rec' and 'module rec' we add the thing being defined
let mtypNS = !(envNS.eModuleOrNamespaceTypeAccumulator)
let mtypRoot, mspecNSOpt = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mtypRoot, mspecNSs = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mspecNSOpt = List.tryHead mspecNSs
mspecNSs |> List.iter (fun mspec ->
let modref = mkLocalModRef mspec
let item = Item.ModuleOrNamespaces [modref]
CallNameResolutionSink cenv.tcSink (mspec.Range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights))
// For 'namespace rec' and 'module rec' we add the thing being defined
let envNS = if isRec then AddLocalRootModuleOrNamespace cenv.tcSink cenv.g cenv.amap m envNS mtypRoot else envNS
@ -16688,7 +16708,13 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv:cenv) parent typeNames scopem
let envNS = ImplicitlyOpenOwnNamespace cenv.tcSink cenv.g cenv.amap m enclosingNamespacePath envNS
let mtypNS = !(envNS.eModuleOrNamespaceTypeAccumulator)
let mtypRoot, mspecNSOpt = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mtypRoot, mspecNSs = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mspecNSOpt = List.tryHead mspecNSs
mspecNSs |> List.iter (fun mspec ->
let modref = mkLocalModRef mspec
let item = Item.ModuleOrNamespaces [modref]
CallNameResolutionSink cenv.tcSink (mspec.Range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights))
// For 'namespace rec' and 'module rec' we add the thing being defined
let envNS = if isRec then AddLocalRootModuleOrNamespace cenv.tcSink cenv.g cenv.amap m envNS mtypRoot else envNS

Просмотреть файл

@ -13,6 +13,7 @@
module internal Microsoft.FSharp.Compiler.Driver
open System
open System.Collections.Concurrent
open System.Collections.Generic
open System.Diagnostics
open System.Globalization
@ -53,7 +54,7 @@ open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.TcGlobals
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -1103,7 +1104,7 @@ module StaticLinker =
// Don't save interface, optimization or resource definitions for provider-generated assemblies.
// These are "fake".
let isProvided (ccu: CcuThunk option) =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match ccu with
| Some c -> c.IsProviderGenerated
| None -> false
@ -1333,7 +1334,7 @@ module StaticLinker =
// prior to this point.
let StaticLink (ctok, tcConfig:TcConfig, tcImports:TcImports, ilGlobals:ILGlobals) =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let providerGeneratedAssemblies =
[ // Add all EST-generated assemblies into the static linking set
@ -1347,7 +1348,7 @@ module StaticLinker =
(fun ilxMainModule -> LegacyFindAndAddMscorlibTypesForStaticLinkingIntoFSharpCoreLibraryForNet20 (tcConfig, ilGlobals, ilxMainModule))
elif not tcConfig.standalone && tcConfig.extraStaticLinkRoots.IsEmpty
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
&& providerGeneratedAssemblies.IsEmpty
#endif
then
@ -1360,7 +1361,7 @@ module StaticLinker =
ReportTime tcConfig "Static link"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
Morphs.enableMorphCustomAttributeData()
let providerGeneratedILModules = FindProviderGeneratedILModules (ctok, tcImports, providerGeneratedAssemblies)
@ -1758,7 +1759,7 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie
let inputs =
// Deduplicate module names
let moduleNamesDict = Dictionary<string,Set<string>>()
let moduleNamesDict = ConcurrentDictionary<string,Set<string>>()
inputs
|> List.map (fun (input,x) -> DeduplicateParsedInputModuleName moduleNamesDict input,x)

Просмотреть файл

@ -18,7 +18,6 @@
<NoWarn>$(NoWarn);62</NoWarn>
<AssemblyName>fsi</AssemblyName>
<BaseAddress>0x0A000000</BaseAddress>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetDotnetProfile)'=='net40'">FSI_SHADOW_COPY_REFERENCES;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetDotnetProfile)'=='net40'">FSI_SERVER;$(DefineConstants)</DefineConstants>

Просмотреть файл

@ -1671,7 +1671,7 @@ module internal MagicAssemblyResolution =
| Some (OkResult (warns,[r])) -> OkResult (warns, Choice1Of2 r.resolvedPath)
| _ ->
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tcImports.TryFindProviderGeneratedAssemblyByName(ctok, simpleAssemName) with
| Some(assembly) -> OkResult([],Choice2Of2 assembly)
| None ->
@ -2464,8 +2464,6 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
do tcConfigB.useFsiAuxLib <- fsi.UseFsiAuxLib
#if FSI_TODO_NETCORE
// "CompilationAndEvaluation" assembly resolution for F# Interactive is not yet properly figured out on .NET Core
do tcConfigB.resolutionEnvironment <- ResolutionEnvironment.EditingOrCompilation false
do tcConfigB.useSimpleResolution <- true
do SetTargetProfile tcConfigB "netcore" // always assume System.Runtime codegen
#endif
@ -2564,7 +2562,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
// Explanation: This callback is invoked during compilation to resolve assembly references
// We don't yet propagate the ctok through these calls (though it looks plausible to do so).
let ctok = AssumeCompilationThreadWithoutEvidence ()
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
match tcImports.TryFindProviderGeneratedAssemblyByName (ctok, aref.Name) with
| Some assembly -> Some (Choice2Of2 assembly)
| None ->

Просмотреть файл

@ -13,7 +13,6 @@
<NoWarn>$(NoWarn);62</NoWarn>
<AssemblyName>fsiAnyCpu</AssemblyName>
<BaseAddress>0x0A000000</BaseAddress>
<DefineConstants>EXTENSIONTYPING;$(DefineConstants)</DefineConstants>
<DefineConstants>COMPILER;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetDotnetProfile)'=='net40'">FSI_SHADOW_COPY_REFERENCES;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetDotnetProfile)'=='net40'">FSI_SERVER;$(DefineConstants)</DefineConstants>

Просмотреть файл

@ -17,7 +17,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.IL
open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.Ast
open Microsoft.FSharp.Compiler.ErrorLogger
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -27,7 +27,7 @@ type AssemblyLoader =
/// Resolve an Abstract IL assembly reference to a Ccu
abstract FindCcuFromAssemblyRef : CompilationThreadToken * range * ILAssemblyRef -> CcuResolutionResult
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Get a flag indicating if an assembly is a provided assembly, plus the
/// table of information recording remappings from type names in the provided assembly to type
@ -100,7 +100,7 @@ let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) =
fakeTyconRef.Deref
with _ ->
error (Error(FSComp.SR.impReferencedTypeCouldNotBeFoundInAssembly(String.concat "." (Array.append path [| typeName |]), ccu.AssemblyName),m))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
// Validate (once because of caching)
match tycon.TypeReprInfo with
| TProvidedTypeExtensionPoint info ->
@ -195,7 +195,7 @@ let rec CanImportILType (env:ImportMap) m typ =
| ILType.Modified(_,_,ty) -> CanImportILType env m ty
| ILType.TypeVar _u16 -> true
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Import a provided type reference as an F# type TyconRef
let ImportProvidedNamedType (env:ImportMap) (m:range) (st:Tainted<ProvidedType>) =
@ -566,7 +566,7 @@ let ImportILAssembly(amap:(unit -> ImportMap),m,auxModuleLoader,sref,sourceDir,f
let ccuData : CcuData =
{ IsFSharp=false
UsesFSharp20PlusQuotations=false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
InvalidateEvent=invalidateCcu
IsProviderGenerated = false
ImportProvidedType = (fun ty -> ImportProvidedType (amap()) m ty)

Просмотреть файл

@ -8,7 +8,7 @@ open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.Range
open Microsoft.FSharp.Compiler.AbstractIL.IL
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
@ -21,7 +21,7 @@ type AssemblyLoader =
/// Resolve an Abstract IL assembly reference to a Ccu
abstract FindCcuFromAssemblyRef : CompilationThreadToken * range * ILAssemblyRef -> CcuResolutionResult
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Get a flag indicating if an assembly is a provided assembly, plus the
/// table of information recording remappings from type names in the provided assembly to type
/// names in the statically linked, embedded assembly.
@ -60,7 +60,7 @@ val internal ImportILType : ImportMap -> range -> TType list -> ILType -> TType
/// Pre-check for ability to import an IL type as an F# type.
val internal CanImportILType : ImportMap -> range -> ILType -> bool
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Import a provided type as an F# type.
val internal ImportProvidedType : ImportMap -> range -> (* TType list -> *) Tainted<ProvidedType> -> TType

Просмотреть файл

@ -23,7 +23,7 @@ open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Compiler.Lib
open Microsoft.FSharp.Core.Printf
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
open Microsoft.FSharp.Core.CompilerServices
#endif
@ -55,14 +55,14 @@ let isExnDeclTy g typ =
/// Get the base type of a type, taking into account type instantiations. Return None if the
/// type has no base type.
let GetSuperTypeOfType g amap m typ =
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
let typ = (if isAppTy g typ && (tcrefOfAppTy g typ).IsProvided then stripTyEqns g typ else stripTyEqnsAndMeasureEqns g typ)
#else
let typ = stripTyEqnsAndMeasureEqns g typ
#endif
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
let st = info.ProvidedType
let superOpt = st.PApplyOption((fun st -> match st.BaseType with null -> None | t -> Some t),m)
@ -125,7 +125,7 @@ let rec GetImmediateInterfacesOfType skipUnref g amap m typ =
yield mkAppTy g.system_GenericIEquatable_tcref [typ]]
else
match metadataOfTy g typ with
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedTypeMetadata info ->
[ for ity in info.ProvidedType.PApplyArray((fun st -> st.GetInterfaces()), "GetInterfaces", m) do
yield Import.ImportProvidedType amap m ity ]
@ -398,7 +398,7 @@ type ValRef with
// as backing data for MethInfo, PropInfo etc.
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Get the return type of a provided method, where 'void' is returned as 'None'
let GetCompiledReturnTyOfProvidedMethodInfo amap m (mi:Tainted<ProvidedMethodBase>) =
let returnType =
@ -583,7 +583,7 @@ type ParamData =
//-------------------------------------------------------------------------
// Helper methods associated with type providers
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
type ILFieldInit with
/// Compute the ILFieldInit for the given provided constant value for a provided enum type.
@ -862,7 +862,7 @@ type MethInfo =
/// Describes a use of a pseudo-method corresponding to the default constructor for a .NET struct type
| DefaultStructCtor of TcGlobals * TType
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Describes a use of a method backed by provided metadata
| ProvidedMeth of Import.ImportMap * Tainted<ProvidedMethodBase> * ExtensionMethodPriority option * range
#endif
@ -876,7 +876,7 @@ type MethInfo =
| ILMeth(_g,ilminfo,_) -> ilminfo.ApparentEnclosingType
| FSMeth(_g,typ,_,_) -> typ
| DefaultStructCtor(_g,typ) -> typ
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,m) ->
Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType),m))
#endif
@ -895,7 +895,7 @@ type MethInfo =
match x with
| ILMeth _ -> None
| FSMeth _ -> None
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth (_, mb, _, m) ->
let staticParams = mb.PApplyWithProvider((fun (mb,provider) -> mb.GetStaticParametersForMethod(provider)), range=m)
let staticParams = staticParams.PApplyArray(id, "GetStaticParametersForMethod", m)
@ -911,7 +911,7 @@ type MethInfo =
match x with
| ILMeth(_,_,pri) -> pri
| FSMeth(_,_,_,pri) -> pri
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,_,pri,_) -> pri
#endif
| DefaultStructCtor _ -> None
@ -927,7 +927,7 @@ type MethInfo =
match x with
| ILMeth(_,y,_) -> "ILMeth: " + y.ILName
| FSMeth(_,_,vref,_) -> "FSMeth: " + vref.LogicalName
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> "ProvidedMeth: " + mi.PUntaint((fun mi -> mi.Name),m)
#endif
| DefaultStructCtor _ -> ".ctor"
@ -938,7 +938,7 @@ type MethInfo =
match x with
| ILMeth(_,y,_) -> y.ILName
| FSMeth(_,_,vref,_) -> vref.LogicalName
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.Name),m)
#endif
| DefaultStructCtor _ -> ".ctor"
@ -953,7 +953,7 @@ type MethInfo =
member x.HasDirectXmlComment =
match x with
| FSMeth(g,_,vref,_) -> valRefInThisAssembly g.compilingFslib vref
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> true
#endif
| _ -> false
@ -972,7 +972,7 @@ type MethInfo =
| ILMeth(g,_,_) -> g
| FSMeth(g,_,_,_) -> g
| DefaultStructCtor (g,_) -> g
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,_,_,_) -> amap.g
#endif
@ -986,7 +986,7 @@ type MethInfo =
let _,memberMethodTypars,_,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (typ,vref)
memberMethodTypars
| DefaultStructCtor _ -> []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> [] // There will already have been an error if there are generic parameters here.
#endif
@ -1001,7 +1001,7 @@ type MethInfo =
| ILMeth(_,_,_) -> XmlDoc.Empty
| FSMeth(_,_,vref,_) -> vref.XmlDoc
| DefaultStructCtor _ -> XmlDoc.Empty
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m)->
XmlDoc (mi.PUntaint((fun mix -> (mix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(mi.TypeProvider.PUntaintNoFailure(id))),m))
#endif
@ -1020,7 +1020,7 @@ type MethInfo =
| ILMeth(_,ilminfo,_) -> [ilminfo.NumParams]
| FSMeth(g,_,vref,_) -> GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref |> List.map List.length
| DefaultStructCtor _ -> [0]
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> [mi.PUntaint((fun mi -> mi.GetParameters().Length),m)] // Why is this a list? Answer: because the method might be curried
#endif
@ -1032,7 +1032,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsInstance
| FSMeth(_,_,vref,_) -> vref.IsInstanceMember || x.IsCSharpStyleExtensionMember
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> not mi.IsConstructor && not mi.IsStatic),m)
#endif
@ -1046,7 +1046,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsProtectedAccessibility
| FSMeth _ -> false
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsFamily), m)
#endif
@ -1055,7 +1055,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsVirtual
| FSMeth(_,_,vref,_) -> vref.IsVirtualMember
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsVirtual), m)
#endif
@ -1064,7 +1064,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsConstructor
| FSMeth(_g,_,vref,_) -> (vref.MemberInfo.Value.MemberFlags.MemberKind = MemberKind.Constructor)
| DefaultStructCtor _ -> true
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsConstructor), m)
#endif
@ -1076,7 +1076,7 @@ type MethInfo =
| VSome x -> x.IsClassConstructor
| _ -> false
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsConstructor && mi.IsStatic), m) // Note: these are never public anyway
#endif
@ -1087,7 +1087,7 @@ type MethInfo =
isInterfaceTy g x.EnclosingType ||
vref.MemberInfo.Value.MemberFlags.IsDispatchSlot
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> x.IsVirtual // Note: follow same implementation as ILMeth
#endif
@ -1098,7 +1098,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsFinal
| FSMeth(_g,_,_vref,_) -> false
| DefaultStructCtor _ -> true
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsFinal), m)
#endif
@ -1113,7 +1113,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsAbstract
| FSMeth(g,_,vref,_) -> isInterfaceTy g minfo.EnclosingType || vref.IsDispatchSlotMember
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsAbstract), m)
#endif
@ -1123,7 +1123,7 @@ type MethInfo =
(match x with
| ILMeth(_,x,_) -> x.IsNewSlot
| FSMeth(_,_,vref,_) -> vref.IsDispatchSlotMember
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsHideBySig), m) // REVIEW: Check this is correct
#endif
| DefaultStructCtor _ -> false))
@ -1134,7 +1134,7 @@ type MethInfo =
| ILMeth _ -> false
| FSMeth(g,_,vref,_) -> vref.IsFSharpExplicitInterfaceImplementation g
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> false
#endif
@ -1144,7 +1144,7 @@ type MethInfo =
| ILMeth _ -> false
| FSMeth(_,_,vref,_) -> vref.IsDefiniteFSharpOverrideMember
| DefaultStructCtor _ -> false
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> false
#endif
@ -1183,7 +1183,7 @@ type MethInfo =
member x.IsFSharpEventPropertyMethod =
match x with
| FSMeth(g,_,vref,_) -> vref.IsFSharpEventProperty(g)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ -> false
#endif
| _ -> false
@ -1216,7 +1216,7 @@ type MethInfo =
| ILMeth(_,x1,_), ILMeth(_,x2,_) -> (x1.RawMetadata === x2.RawMetadata)
| FSMeth(g,_,vref1,_), FSMeth(_,_,vref2,_) -> valRefEq g vref1 vref2
| DefaultStructCtor(g,ty1), DefaultStructCtor(_,ty2) -> tyconRefEq g (tcrefOfAppTy g ty1) (tcrefOfAppTy g ty2)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi1,_,_),ProvidedMeth(_,mi2,_,_) -> ProvidedMethodBase.TaintedEquals (mi1, mi2)
#endif
| _ -> false
@ -1229,7 +1229,7 @@ type MethInfo =
| FSMeth(_,_,vref,_) -> hash vref.LogicalName
| DefaultStructCtor(_,_ty) -> 34892 // "ty" doesn't support hashing. We could use "hash (tcrefOfAppTy g ty).CompiledName" or
// something but we don't have a "g" parameter here yet. But this hash need only be very approximate anyway
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_,mi,_,_) -> ProvidedMethodInfo.TaintedGetHashCode(mi)
#endif
@ -1242,7 +1242,7 @@ type MethInfo =
| ILMethInfo(_,typ,Some declaringTyconRef,md,_) -> MethInfo.CreateILExtensionMeth(amap, m, instType inst typ, declaringTyconRef, pri, md)
| FSMeth(g,typ,vref,pri) -> FSMeth(g,instType inst typ,vref,pri)
| DefaultStructCtor(g,typ) -> DefaultStructCtor(g,instType inst typ)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth _ ->
match inst with
| [] -> x
@ -1259,7 +1259,7 @@ type MethInfo =
let _,_,retTy,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (typ,vref)
retTy |> Option.map (instType inst)
| DefaultStructCtor _ -> None
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,m) ->
GetCompiledReturnTyOfProvidedMethodInfo amap m mi
#endif
@ -1279,7 +1279,7 @@ type MethInfo =
let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (typ,vref,minst)
paramTypes |> List.mapSquared (fun (ParamNameAndType(_,ty)) -> instType inst ty)
| DefaultStructCtor _ -> []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,m) ->
// A single group of tupled arguments
[ [ for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters",m) do
@ -1302,7 +1302,7 @@ type MethInfo =
[ typ ]
else []
| DefaultStructCtor _ -> []
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,m) ->
if x.IsInstance then [ Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType),m)) ] // find the type of the 'this' argument
else []
@ -1405,7 +1405,7 @@ type MethInfo =
| DefaultStructCtor _ ->
[[]]
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,_) ->
// A single group of tupled arguments
[ [for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do
@ -1468,7 +1468,7 @@ type MethInfo =
let paramType = ImportILTypeFromMetadata amap m ftinfo.ILScopeRef ftinfo.TypeInst formalMethTyparTys p.Type
yield TSlotParam(p.Name, paramType, p.IsIn, p.IsOut, p.IsOptional, []) ] ]
formalRetTy, formalParams
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth (_,mi,_,_) ->
// GENERIC TYPE PROVIDERS: for generics, formal types should be generated here, not the actual types
// For non-generic type providers there is no difference
@ -1498,7 +1498,7 @@ type MethInfo =
items |> ParamNameAndType.InstantiateCurried inst
| DefaultStructCtor _ ->
[[]]
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth(amap,mi,_,_) ->
// A single set of tupled parameters
[ [for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do
@ -1538,7 +1538,7 @@ type MethInfo =
memberParentTypars
| DefaultStructCtor(g,typ) ->
(tcrefOfAppTy g typ).Typars(m)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedMeth (amap,_,_,_) ->
(tcrefOfAppTy amap.g x.EnclosingType).Typars(m)
#endif
@ -1552,7 +1552,7 @@ type MethInfo =
type ILFieldInfo =
/// Represents a single use of a field backed by Abstract IL metadata
| ILFieldInfo of ILTypeInfo * ILFieldDef // .NET IL fields
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// Represents a single use of a field backed by provided metadata
| ProvidedField of Import.ImportMap * Tainted<ProvidedFieldInfo> * range
#endif
@ -1561,7 +1561,7 @@ type ILFieldInfo =
member x.EnclosingType =
match x with
| ILFieldInfo(tinfo,_) -> tinfo.ToType
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(amap,fi,m) -> (Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.DeclaringType),m)))
#endif
@ -1569,7 +1569,7 @@ type ILFieldInfo =
member x.ILTypeRef =
match x with
| ILFieldInfo(tinfo,_) -> tinfo.ILTypeRef
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(amap,fi,m) -> (Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.DeclaringType),m))).TypeRef
#endif
@ -1580,7 +1580,7 @@ type ILFieldInfo =
member x.TypeInst =
match x with
| ILFieldInfo(tinfo,_) -> tinfo.TypeInst
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField _ -> [] /// GENERIC TYPE PROVIDERS
#endif
@ -1588,7 +1588,7 @@ type ILFieldInfo =
member x.FieldName =
match x with
| ILFieldInfo(_,pd) -> pd.Name
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.Name),m)
#endif
@ -1596,7 +1596,7 @@ type ILFieldInfo =
member x.IsInitOnly =
match x with
| ILFieldInfo(_,pd) -> pd.IsInitOnly
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsInitOnly),m)
#endif
@ -1604,7 +1604,7 @@ type ILFieldInfo =
member x.IsValueType =
match x with
| ILFieldInfo(tinfo,_) -> tinfo.IsValueType
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(amap,_,_) -> isStructTy amap.g x.EnclosingType
#endif
@ -1612,7 +1612,7 @@ type ILFieldInfo =
member x.IsStatic =
match x with
| ILFieldInfo(_,pd) -> pd.IsStatic
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsStatic),m)
#endif
@ -1620,7 +1620,7 @@ type ILFieldInfo =
member x.IsSpecialName =
match x with
| ILFieldInfo(_,pd) -> pd.IsSpecialName
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsSpecialName),m)
#endif
@ -1628,7 +1628,7 @@ type ILFieldInfo =
member x.LiteralValue =
match x with
| ILFieldInfo(_,pd) -> if pd.IsLiteral then pd.LiteralValue else None
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi,m) ->
if fi.PUntaint((fun fi -> fi.IsLiteral),m) then
Some (ILFieldInit.FromProvidedObj m (fi.PUntaint((fun fi -> fi.GetRawConstantValue()),m)))
@ -1640,7 +1640,7 @@ type ILFieldInfo =
member x.ILFieldType =
match x with
| ILFieldInfo (_,fdef) -> fdef.Type
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(amap,fi,m) -> Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.FieldType),m))
#endif
@ -1648,14 +1648,14 @@ type ILFieldInfo =
member x.FieldType(amap,m) =
match x with
| ILFieldInfo (tinfo,fdef) -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] fdef.Type
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(amap,fi,m) -> Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.FieldType),m))
#endif
static member ILFieldInfosUseIdenticalDefinitions x1 x2 =
match x1,x2 with
| ILFieldInfo(_, x1), ILFieldInfo(_, x2) -> (x1 === x2)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedField(_,fi1,_), ProvidedField(_,fi2,_)-> ProvidedFieldInfo.TaintedEquals (fi1, fi2)
| _ -> false
#endif
@ -1807,7 +1807,7 @@ type PropInfo =
| FSProp of TcGlobals * TType * ValRef option * ValRef option
/// An F# use of a property backed by Abstract IL metadata
| ILProp of TcGlobals * ILPropInfo
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// An F# use of a property backed by provided metadata
| ProvidedProp of Import.ImportMap * Tainted<ProvidedPropertyInfo> * range
#endif
@ -1825,7 +1825,7 @@ type PropInfo =
match x with
| FSProp(g,_,Some vref,_)
| FSProp(g,_,_,Some vref) -> valRefInThisAssembly g.compilingFslib vref
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp _ -> true
#endif
| _ -> false
@ -1836,7 +1836,7 @@ type PropInfo =
| ILProp(_,x) -> x.PropertyName
| FSProp(_,_,Some vref,_)
| FSProp(_,_,_, Some vref) -> vref.PropertyName
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.Name),m)
#endif
| FSProp _ -> failwith "unreachable"
@ -1846,7 +1846,7 @@ type PropInfo =
match x with
| ILProp(_,x) -> x.HasGetter
| FSProp(_,_,x,_) -> Option.isSome x
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanRead),m)
#endif
@ -1855,7 +1855,7 @@ type PropInfo =
match x with
| ILProp(_,x) -> x.HasSetter
| FSProp(_,_,_,x) -> Option.isSome x
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanWrite),m)
#endif
@ -1866,7 +1866,7 @@ type PropInfo =
match x with
| ILProp(_,x) -> x.ILTypeInfo.ToType
| FSProp(_,typ,_,_) -> typ
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(amap,pi,m) ->
Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.DeclaringType),m))
#endif
@ -1883,7 +1883,7 @@ type PropInfo =
| FSProp(_,_,Some vref,_)
| FSProp(_,_,_, Some vref) -> vref.IsVirtualMember
| FSProp _-> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
let mi = ArbitraryMethodInfoOfPropertyInfo pi m
mi.PUntaint((fun mi -> mi.IsVirtual), m)
@ -1896,7 +1896,7 @@ type PropInfo =
| FSProp(_,_,Some vref,_)
| FSProp(_,_,_, Some vref) -> vref.IsDispatchSlotMember
| FSProp(_,_,None,None) -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
let mi = ArbitraryMethodInfoOfPropertyInfo pi m
mi.PUntaint((fun mi -> mi.IsHideBySig), m)
@ -1912,7 +1912,7 @@ type PropInfo =
| FSProp(g,typ,_, Some vref) ->
isInterfaceTy g typ || (vref.MemberInfo.Value.MemberFlags.IsDispatchSlot)
| FSProp _ -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
let mi = ArbitraryMethodInfoOfPropertyInfo pi m
mi.PUntaint((fun mi -> mi.IsVirtual), m)
@ -1925,7 +1925,7 @@ type PropInfo =
| FSProp(_,_,Some vref,_)
| FSProp(_,_,_, Some vref) -> not vref.IsInstanceMember
| FSProp(_,_,None,None) -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
(ArbitraryMethodInfoOfPropertyInfo pi m).PUntaint((fun mi -> mi.IsStatic), m)
#endif
@ -1961,7 +1961,7 @@ type PropInfo =
arginfos.Length = 1 && arginfos.Head.Length >= 2
| FSProp(_,_,None,None) ->
failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
pi.PUntaint((fun pi -> pi.GetIndexParameters().Length), m)>0
#endif
@ -1970,7 +1970,7 @@ type PropInfo =
member x.IsFSharpEventProperty =
match x with
| FSProp(g,_,Some vref,None) -> vref.IsFSharpEventProperty(g)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp _ -> false
#endif
| _ -> false
@ -1998,7 +1998,7 @@ type PropInfo =
| FSProp(_,_,Some vref,_)
| FSProp(_,_,_, Some vref) -> vref.XmlDoc
| FSProp(_,_,None,None) -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
XmlDoc (pi.PUntaint((fun pix -> (pix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(pi.TypeProvider.PUntaintNoFailure(id))), m))
#endif
@ -2008,7 +2008,7 @@ type PropInfo =
match x with
| ILProp(g,_) -> g
| FSProp(g,_,_,_) -> g
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(amap,_,_) -> amap.g
#endif
@ -2028,7 +2028,7 @@ type PropInfo =
ReturnTypeOfPropertyVal g vref.Deref |> instType inst
| FSProp _ -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,m) ->
Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.PropertyType),m))
#endif
@ -2045,7 +2045,7 @@ type PropInfo =
let inst = GetInstantiationForPropertyVal g (typ,vref)
ArgInfosOfPropertyVal g vref.Deref |> List.map (ParamNameAndType.FromArgInfo >> ParamNameAndType.Instantiate inst)
| FSProp _ -> failwith "unreachable"
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp (_,pi,m) ->
[ for p in pi.PApplyArray((fun pi -> pi.GetIndexParameters()), "GetIndexParameters", m) do
let paramName = p.PUntaint((fun p -> match p.Name with null -> None | s -> Some (mkSynId m s)), m)
@ -2067,7 +2067,7 @@ type PropInfo =
match x with
| ILProp(g,x) -> ILMeth(g,x.GetterMethod(g),None)
| FSProp(g,typ,Some vref,_) -> FSMeth(g,typ,vref,None)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(amap,pi,m) ->
let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetGetMethod()) FSComp.SR.etPropertyCanReadButHasNoGetter
ProvidedMeth(amap, meth, None, m)
@ -2080,7 +2080,7 @@ type PropInfo =
match x with
| ILProp(g,x) -> ILMeth(g,x.SetterMethod(g),None)
| FSProp(g,typ,_,Some vref) -> FSMeth(g,typ,vref,None)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(amap,pi,m) ->
let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetSetMethod()) FSComp.SR.etPropertyCanWriteButHasNoSetter
ProvidedMeth(amap, meth, None, m)
@ -2099,7 +2099,7 @@ type PropInfo =
| ILProp(_, x1), ILProp(_, x2) -> (x1.RawMetadata === x2.RawMetadata)
| FSProp(g, _, vrefa1, vrefb1), FSProp(_, _, vrefa2, vrefb2) ->
(optVrefEq g (vrefa1, vrefa2)) && (optVrefEq g (vrefb1, vrefb2))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi1,_), ProvidedProp(_,pi2,_) -> ProvidedPropertyInfo.TaintedEquals (pi1, pi2)
#endif
| _ -> false
@ -2112,7 +2112,7 @@ type PropInfo =
// Hash on option<string>*option<string>
let vth = (vrefOpt1 |> Option.map (fun vr -> vr.LogicalName), (vrefOpt2 |> Option.map (fun vr -> vr.LogicalName)))
hash vth
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedProp(_,pi,_) -> ProvidedPropertyInfo.TaintedGetHashCode(pi)
#endif
@ -2191,7 +2191,7 @@ type EventInfo =
| FSEvent of TcGlobals * PropInfo * ValRef * ValRef
/// An F# use of an event backed by .NET metadata
| ILEvent of TcGlobals * ILEventInfo
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
/// An F# use of an event backed by provided metadata
| ProvidedEvent of Import.ImportMap * Tainted<ProvidedEventInfo> * range
#endif
@ -2203,7 +2203,7 @@ type EventInfo =
match x with
| ILEvent(_,e) -> e.ILTypeInfo.ToType
| FSEvent (_,p,_,_) -> p.EnclosingType
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (amap,ei,m) -> Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.DeclaringType),m))
#endif
@ -2211,7 +2211,7 @@ type EventInfo =
member x.HasDirectXmlComment =
match x with
| FSEvent (_,p,_,_) -> p.HasDirectXmlComment
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent _ -> true
#endif
| _ -> false
@ -2221,7 +2221,7 @@ type EventInfo =
match x with
| ILEvent _ -> XmlDoc.Empty
| FSEvent (_,p,_,_) -> p.XmlDoc
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei,m) ->
XmlDoc (ei.PUntaint((fun eix -> (eix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(ei.TypeProvider.PUntaintNoFailure(id))), m))
#endif
@ -2231,7 +2231,7 @@ type EventInfo =
match x with
| ILEvent(_,e) -> e.Name
| FSEvent (_,p,_,_) -> p.PropertyName
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei,m) -> ei.PUntaint((fun ei -> ei.Name), m)
#endif
@ -2240,7 +2240,7 @@ type EventInfo =
match x with
| ILEvent(g,e) -> e.IsStatic(g)
| FSEvent (_,p,_,_) -> p.IsStatic
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei,m) ->
let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetAddMethod()) FSComp.SR.etEventNoAdd
meth.PUntaint((fun mi -> mi.IsStatic), m)
@ -2251,7 +2251,7 @@ type EventInfo =
match x with
| ILEvent(g,_) -> g
| FSEvent(g,_,_,_) -> g
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (amap,_,_) -> amap.g
#endif
@ -2265,7 +2265,7 @@ type EventInfo =
match x with
| ILEvent(g,e) -> ILMeth(g,e.AddMethod(g),None)
| FSEvent(g,p,addValRef,_) -> FSMeth(g,p.EnclosingType,addValRef,None)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (amap,ei,m) ->
let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetAddMethod()) FSComp.SR.etEventNoAdd
ProvidedMeth(amap, meth, None, m)
@ -2276,7 +2276,7 @@ type EventInfo =
match x with
| ILEvent(g,e) -> ILMeth(g,e.RemoveMethod(g),None)
| FSEvent(g,p,_,removeValRef) -> FSMeth(g,p.EnclosingType,removeValRef,None)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (amap,ei,m) ->
let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetRemoveMethod()) FSComp.SR.etEventNoRemove
ProvidedMeth(amap, meth, None, m)
@ -2299,7 +2299,7 @@ type EventInfo =
| FSEvent(g,p,_,_) ->
FindDelegateTypeOfPropertyEvent g amap x.EventName m (p.GetPropertyType(amap,m))
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei,_) ->
Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.EventHandlerType), m))
#endif
@ -2311,7 +2311,7 @@ type EventInfo =
| FSEvent(g, pi1, vrefa1, vrefb1), FSEvent(_, pi2, vrefa2, vrefb2) ->
PropInfo.PropInfosUseIdenticalDefinitions pi1 pi2 && valRefEq g vrefa1 vrefa2 && valRefEq g vrefb1 vrefb2
| ILEvent(_, x1), ILEvent(_, x2) -> (x1.RawMetadata === x2.RawMetadata)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei1,_), ProvidedEvent (_,ei2,_) -> ProvidedEventInfo.TaintedEquals (ei1, ei2)
#endif
| _ -> false
@ -2321,7 +2321,7 @@ type EventInfo =
match ei with
| ILEvent(_, x1) -> hash x1.RawMetadata.Name
| FSEvent(_, pi, vref1, vref2) -> hash ( pi.ComputeHashCode(), vref1.LogicalName, vref2.LogicalName)
#if EXTENSIONTYPING
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_,ei,_) -> ProvidedEventInfo.TaintedGetHashCode(ei)
#endif

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше