Merge remote-tracking branch 'upstream/dev16.0' into merges/dev16.0-to-master

This commit is contained in:
Brett V. Forsgren 2019-04-02 13:35:19 -07:00
Родитель 92ffe0ce26 809f41207b
Коммит bd24505312
630 изменённых файлов: 9377 добавлений и 4037 удалений

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

@ -90,7 +90,7 @@ jobs:
- job: Windows
pool:
vmImage: vs2017-win2016
vmImage: windows-2019
timeoutInMinutes: 120
strategy:
maxParallel: 4
@ -128,7 +128,7 @@ jobs:
- job: Windows_FCS
pool:
vmImage: vs2017-win2016
vmImage: windows-2019
timeoutInMinutes: 120
steps:
- script: fcs\build.cmd TestAndNuget

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

@ -66,7 +66,7 @@ Running tests:
To build and test Visual F# IDE Tools, install these requirements:
- Download [Visual Studio 2017](https://www.visualstudio.com/downloads/)
- Download [Visual Studio 2019](https://www.visualstudio.com/downloads/)
- Launch the Visual Studio Installer
- Under the **"Windows"** workload, select **".NET desktop development"**
- Select the optional component **"F# desktop language support"**
@ -78,11 +78,11 @@ Steps to build:
Build.cmd -- build all F# components under the default configuration (Debug)
Build.cmd -configuration Release -- build all F# components as Release
Build.cmd -testDesktop -- build and test all net46 tests
Build.cmd -testDesktop -- build and test all net472 tests
All test options:
-testDesktop -- test all net46 target frameworks
-testDesktop -- test all net472 target frameworks
-testCoreClr -- test all netstandard and netcoreapp target frameworks
-testFSharpQA -- test all F# Cambridge tests
-testVs -- test all VS integration points
@ -95,18 +95,18 @@ Note on Debug vs Release: ``Release`` Configuration has a degraded debugging exp
Note ([#2351](https://github.com/Microsoft/visualfsharp/issues/2351)): if you face this error:
> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe".
> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe".
Or hard crash on launch ("Unknown Error"), delete these folders:
- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev`
- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)`
- `%localappdata%\Microsoft\VisualStudio\16.0_(some number here)RoslynDev`
- `%localappdata%\Microsoft\VisualStudio\16.0_(some number here)`
#### [Optional] Install the Visual F# IDE Tools (Windows Only)
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/.
You can install Visual Studio 2019 from https://www.visualstudio.com/downloads/.
**Note:** This step will install a VSIX extension into Visual Studio "Next" that changes the Visual F# IDE Tools
components installed in that VS installation. You can revert this step by disabling or uninstalling the addin.
@ -135,15 +135,15 @@ Because this uses the "RoslynDev" hive you can simultaneously test changes to an
#### [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:
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:
xcopy /y debug\net40\bin\FSharp.* "%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\15.0_7c5620b7FSharpDev\Extensions\Microsoft.VisualFSharpTools\Visual F# Tools\15.4.1.9055"
xcopy /y debug\net40\bin\FSharp.* "%USERPROFILE%\AppData\Local\Microsoft\VisualStudio\16.0_7c5620b7FSharpDev\Extensions\Microsoft.VisualFSharpTools\Visual F# Tools\16.4.1.9055"
This gives a much tighter inner development loop than uninstalling/reinstalling the VSIX, as you do not have to restart VIsual Studio. Caveat emptor.
#### [Optional] Clobber the F# SDK on the machine
**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 15 is currently the only way to revert this step.**
**Note:** The step below will try to clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsc.exe`` used by the standard install location or ``Microsoft.FSharp.Targets``. **Repairing Visual Studio 16 is currently the only way to revert this step.**
For **Debug**:
@ -184,7 +184,7 @@ If you change error messages you may need to update FSComp.fs in `src\buildfroms
To do this, build the non-buildfromsource version of FSharp.Compiler.Private (src\fsharp\FSharp.Compiler.Private) then check its obj\ directory for `FSComp.fs` and manually copy that into the buildfromsource directory.
.\build net40
copy /y artifacts\obj\FSharp.Compiler.Private\Release\net46\FSComp.* src\buildfromsource\FSharp.Compiler.Private\
copy /y artifacts\obj\FSharp.Compiler.Private\Release\net472\FSComp.* src\buildfromsource\FSharp.Compiler.Private\
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running

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

@ -4,16 +4,6 @@
<Import Project="eng\targets\NGenBinaries.targets" />
<Import Project="FSharp.Profiles.props" />
<PropertyGroup Condition="'$(UseAssetTargetFallback)' == 'true'">
<!--
HACK: Necessary because the `netstandard1.6` version of FSharp.Compiler.Private requires a package that isn't
necessary for `net46`, but the package has a requirement on `net462`. The reference is excluded from the build
during `net46`, but for purposes of restore needs to be present.
-->
<AssetTargetFallback>$(AssetTargetFallback);net462</AssetTargetFallback>
<NoWarn>$(NoWarn);NU1605;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup>
<CompileDependsOn>$(CompileDependsOn);CopyAndSubstituteTextFiles</CompileDependsOn>
</PropertyGroup>

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

@ -7,11 +7,11 @@
<PropertyGroup Condition="'$(FSharpTestCompilerVersion)' == 'net40'">
<DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath>
<FscToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net46</FscToolPath>
<FscToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net472</FscToolPath>
<FscToolExe>fsc.exe</FscToolExe>
<DotnetFscCompilerPath></DotnetFscCompilerPath>
<FsiToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net46</FsiToolPath>
<FsiToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net472</FsiToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>
<DotnetFsiCompilerPath></DotnetFsiCompilerPath>
</PropertyGroup>
@ -32,7 +32,7 @@
<!-- SDK targets override -->
<PropertyGroup>
<_FSharpBuildTargetFramework Condition="'$(FSharpTestCompilerVersion)' == 'net40'">net46</_FSharpBuildTargetFramework>
<_FSharpBuildTargetFramework Condition="'$(FSharpTestCompilerVersion)' == 'net40'">net472</_FSharpBuildTargetFramework>
<_FSharpBuildTargetFramework Condition="'$(FSharpTestCompilerVersion)' == 'coreclr'">netstandard2.0</_FSharpBuildTargetFramework>
<_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\FSharp.Build\$(Configuration)\$(_FSharpBuildTargetFramework)</_FSharpBuildBinPath>

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

@ -1 +1 @@
2.9.0-beta8-63208-01
3.0.0-beta4-19170-01

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

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2036
# Visual Studio Version 16
VisualStudioVersion = 16.0.28729.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}"
EndProject
@ -48,7 +48,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegrat
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}"
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}"
EndProject
@ -288,10 +288,10 @@ Global
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.ActiveCfg = Debug|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.Build.0 = Debug|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.Build.0 = Proto|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.ActiveCfg = Proto|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.Build.0 = Proto|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.ActiveCfg = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.Build.0 = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.ActiveCfg = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.Build.0 = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.Build.0 = Release|Any CPU
{FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|x86.ActiveCfg = Release|Any CPU

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

@ -1,32 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.136
# Visual Studio Version 16
VisualStudioVersion = 16.0.28407.52
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{BB9EAE76-194A-49D8-9618-586CBE7031D9}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Proto|Any CPU = Proto|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Proto|Any CPU.ActiveCfg = Release|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Proto|Any CPU.Build.0 = Release|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.Build.0 = Release|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.Build.0 = Release|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.Build.0 = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Debug|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0 = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Debug|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

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

@ -1,8 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<DefaultValueTuplePackageVersion>$(SystemValueTuplePackageVersion)</DefaultValueTuplePackageVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
@ -11,11 +22,12 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.11.3" />
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="2.9.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
<ProjectReference Include="..\..\src\fsharp\FSharp.Core\FSharp.Core.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
</Project>

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

@ -1,13 +1,87 @@
open System
open System.IO
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
open System.Text
open FSharp.Compiler.ErrorLogger
open FSharp.Compiler.SourceCodeServices
open System.Text
open FSharp.Compiler.Text
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL.ILBinaryReader
open CodeAnalysis.Text
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
[<ClrJob(baseline = true)>]
type CompilerServiceParsing() =
module private SourceText =
open System.Runtime.CompilerServices
let weakTable = ConditionalWeakTable<SourceText, ISourceText>()
let create (sourceText: SourceText) =
let sourceText =
{ new ISourceText with
member __.Item with get index = sourceText.[index]
member __.GetLineString(lineIndex) =
sourceText.Lines.[lineIndex].ToString()
member __.GetLineCount() =
sourceText.Lines.Count
member __.GetLastCharacterPosition() =
if sourceText.Lines.Count > 0 then
(sourceText.Lines.Count, sourceText.Lines.[sourceText.Lines.Count - 1].Span.Length)
else
(0, 0)
member __.GetSubTextString(start, length) =
sourceText.GetSubText(TextSpan(start, length)).ToString()
member __.SubTextEquals(target, startIndex) =
if startIndex < 0 || startIndex >= sourceText.Length then
raise (ArgumentOutOfRangeException("startIndex"))
if String.IsNullOrEmpty(target) then
raise (ArgumentException("Target is null or empty.", "target"))
let lastIndex = startIndex + target.Length
if lastIndex <= startIndex || lastIndex >= sourceText.Length then
raise (ArgumentException("Target is too big.", "target"))
let mutable finished = false
let mutable didEqual = true
let mutable i = 0
while not finished && i < target.Length do
if target.[i] <> sourceText.[startIndex + i] then
didEqual <- false
finished <- true // bail out early
else
i <- i + 1
didEqual
member __.ContentEquals(sourceText) =
match sourceText with
| :? SourceText as sourceText -> sourceText.ContentEquals(sourceText)
| _ -> false
member __.Length = sourceText.Length
member __.CopyTo(sourceIndex, destination, destinationIndex, count) =
sourceText.CopyTo(sourceIndex, destination, destinationIndex, count)
}
sourceText
type SourceText with
member this.ToFSharpSourceText() =
SourceText.weakTable.GetValue(this, Runtime.CompilerServices.ConditionalWeakTable<_,_>.CreateValueCallback(SourceText.create))
[<MemoryDiagnoser>]
type CompilerService() =
let mutable checkerOpt = None
@ -24,6 +98,17 @@ type CompilerServiceParsing() =
IsExe = false
}
let mutable assembliesOpt = None
let readerOptions =
{
pdbDirPath = None
ilGlobals = mkILGlobals ILScopeRef.Local
reduceMemoryUsage = ReduceMemoryFlag.No
metadataOnly = MetadataOnlyFlag.Yes
tryGetMetadataSnapshot = fun _ -> None
}
[<GlobalSetup>]
member __.Setup() =
match checkerOpt with
@ -32,18 +117,25 @@ type CompilerServiceParsing() =
match sourceOpt with
| None ->
let source = File.ReadAllText("""..\..\..\..\..\src\fsharp\TypeChecker.fs""")
sourceOpt <- Some(source)
sourceOpt <- Some <| SourceText.From(File.OpenRead("""..\..\..\..\..\src\fsharp\TypeChecker.fs"""), Encoding.Default, SourceHashAlgorithm.Sha1, true)
| _ -> ()
match assembliesOpt with
| None ->
assembliesOpt <-
System.AppDomain.CurrentDomain.GetAssemblies()
|> Array.map (fun x -> (x.Location))
|> Some
| _ -> ()
[<IterationSetup>]
[<IterationSetup(Target = "Parsing")>]
member __.ParsingSetup() =
match checkerOpt with
| None -> failwith "no checker"
| Some(checker) ->
checker.InvalidateAll()
checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
checker.ParseFile("dummy.fs", "dummy", parsingOptions) |> Async.RunSynchronously |> ignore
checker.ParseFile("dummy.fs", SourceText.ofString "dummy", parsingOptions) |> Async.RunSynchronously |> ignore
[<Benchmark>]
member __.Parsing() =
@ -51,10 +143,62 @@ type CompilerServiceParsing() =
| None, _ -> failwith "no checker"
| _, None -> failwith "no source"
| Some(checker), Some(source) ->
let results = checker.ParseFile("TypeChecker.fs", source, parsingOptions) |> Async.RunSynchronously
let results = checker.ParseFile("TypeChecker.fs", source.ToFSharpSourceText(), parsingOptions) |> Async.RunSynchronously
if results.ParseHadErrors then failwithf "parse had errors: %A" results.Errors
[<IterationSetup(Target = "ILReading")>]
member __.ILReadingSetup() =
// With caching, performance increases an order of magnitude when re-reading an ILModuleReader.
// Clear it for benchmarking.
ClearAllILModuleReaderCache()
[<Benchmark>]
member __.ILReading() =
match assembliesOpt with
| None -> failwith "no assemblies"
| Some(assemblies) ->
// We try to read most of everything in the assembly that matter, mainly types with their properties, methods, and fields.
// CustomAttrs and SecurityDecls are lazy until you call them, so we call them here for benchmarking.
assemblies
|> Array.iter (fun (fileName) ->
let reader = OpenILModuleReader fileName readerOptions
let ilModuleDef = reader.ILModuleDef
let ilAssemblyManifest = ilModuleDef.Manifest.Value
ilAssemblyManifest.CustomAttrs |> ignore
ilAssemblyManifest.SecurityDecls |> ignore
ilAssemblyManifest.ExportedTypes.AsList
|> List.iter (fun x ->
x.CustomAttrs |> ignore
)
ilModuleDef.CustomAttrs |> ignore
ilModuleDef.TypeDefs.AsArray
|> Array.iter (fun ilTypeDef ->
ilTypeDef.CustomAttrs |> ignore
ilTypeDef.SecurityDecls |> ignore
ilTypeDef.Methods.AsArray
|> Array.iter (fun ilMethodDef ->
ilMethodDef.CustomAttrs |> ignore
ilMethodDef.SecurityDecls |> ignore
)
ilTypeDef.Fields.AsList
|> List.iter (fun ilFieldDef ->
ilFieldDef.CustomAttrs |> ignore
)
ilTypeDef.Properties.AsList
|> List.iter (fun ilPropertyDef ->
ilPropertyDef.CustomAttrs |> ignore
)
)
)
[<EntryPoint>]
let main argv =
let _ = BenchmarkRunner.Run<CompilerServiceParsing>()
let _ = BenchmarkRunner.Run<CompilerService>()
0

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

@ -0,0 +1,3 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('FSharp.Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

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

@ -0,0 +1,3 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('FSharp.Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
</Project>

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

@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/build.sh" --build $@
"$scriptroot/eng/build.sh" --build --restore $@

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

@ -34,7 +34,7 @@ param (
# Options
[switch][Alias('proto')]$bootstrap,
[string]$bootstrapConfiguration = "Proto",
[string]$bootstrapTfm = "net46",
[string]$bootstrapTfm = "net472",
[switch][Alias('bl')]$binaryLog,
[switch]$ci,
[switch]$official,
@ -184,12 +184,12 @@ function UpdatePath() {
}
TestAndAddToPath $subdir
TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net46"
TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net46"
TestAndAddToPath "$ArtifactsDir\bin\fsc\$configuration\net472"
TestAndAddToPath "$ArtifactsDir\bin\fsiAnyCpu\$configuration\net472"
}
function VerifyAssemblyVersions() {
$fsiPath = Join-Path $ArtifactsDir "bin\fsi\Proto\net46\fsi.exe"
$fsiPath = Join-Path $ArtifactsDir "bin\fsi\Proto\net472\fsi.exe"
# Only verify versions on CI or official build
if ($ci -or $official) {
@ -238,8 +238,8 @@ try {
VerifyAssemblyVersions
}
$desktopTargetFramework = "net46"
$coreclrTargetFramework = "netcoreapp2.0"
$desktopTargetFramework = "net472"
$coreclrTargetFramework = "netcoreapp2.1"
if ($testDesktop) {
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
@ -266,7 +266,7 @@ try {
UpdatePath
$env:HOSTED_COMPILER = 1
$env:CSC_PIPE = "$env:USERPROFILE\.nuget\packages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe"
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net46\FSharp.Core.dll"
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
Exec-Console $perlExe """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"

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

@ -12,18 +12,18 @@
<!-- Version number computation -->
<PropertyGroup>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<FSCoreMajorVersion>4.5</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).5</FSCorePackageVersion>
<FSCoreMajorVersion>4.6</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).2</FSCorePackageVersion>
<FSCoreVersion>$(FSCoreMajorVersion).0</FSCoreVersion>
<FSCoreVersion Condition="'$(OfficialBuildId)' == ''">$(FSCoreVersion).0</FSCoreVersion>
<!-- PR builds should specify a 4-part version number -->
<FSPackageMajorVersion>10.2</FSPackageMajorVersion>
<FSPackageVersion>$(FSPackageMajorVersion).3</FSPackageVersion>
<FSPackageMajorVersion>10.4</FSPackageMajorVersion>
<FSPackageVersion>$(FSPackageMajorVersion).2</FSPackageVersion>
<FSProductVersion>$(FSPackageVersion)</FSProductVersion>
<FSProductVersion Condition="'$(OfficialBuildId)' == ''">$(FSProductVersion).0</FSProductVersion>
<!-- PR builds should specify a 4-part version number -->
<VSMajorVersion>15</VSMajorVersion>
<VSMinorVersion>9</VSMinorVersion>
<VSMajorVersion>16</VSMajorVersion>
<VSMinorVersion>0</VSMinorVersion>
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
<VSAssemblyVersion>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersion>
<VSAssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VSAssemblyVersion).0</VSAssemblyVersion>
@ -35,17 +35,6 @@
<VersionPrefix Condition="'$(UseFSharpPackageVersion)' == 'true'">$(FSCorePackageVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</VersionPrefix>
<!--
Previous nightly versions were of the form 15.9.20190322.1, but after the arcade sdk integration, that form
changed to 15.9.0.1917201 which breaks the nightly upgrade. To enable this to work for 15.9 builds we re-insert
the build number (date) so that it's always increasing.
THIS CHANGE SHOULD NOT FLOW INTO ANY DEV16 BRANCHES.
-->
<_BuildNumber>$(OfficialBuildId)</_BuildNumber>
<_BuildNumber Condition="'$(OfficialBuildId)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd)).0</_BuildNumber>
<VsixVersionDateStampFix>$(_BuildNumber.Split('.')[0])</VsixVersionDateStampFix>
<VsixVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).$(VsixVersionDateStampFix)</VsixVersionPrefix>
<AssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VersionPrefix)</AssemblyVersion>
<!-- PR builds should explicitly specify a version number -->
</PropertyGroup>
@ -65,12 +54,15 @@
https://myget.org/F/vs-editor/api/v3/index.json;
https://vside.myget.org/F/vssdk/api/v3/index.json;
https://vside.myget.org/F/vs-impl/api/v3/index.json;
https://myget.org/F/roslyn_concord/api/v3/index.json;
https://vside.myget.org/F/devcore/api/v3/index.json;
</RestoreSources>
<!-- version numbers from files -->
<RoslynPackageVersion>$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\RoslynPackageVersion.txt').Trim())</RoslynPackageVersion>
<!-- System.* packages -->
<SystemCollectionsImmutablePackageVersion>1.5.0</SystemCollectionsImmutablePackageVersion>
<SystemConsolePackageVersion>4.3.0</SystemConsolePackageVersion>
<SystemDesignPackageVersion>4.0.0</SystemDesignPackageVersion>
<SystemDiagnosticsProcessPackageVersion>4.3.0</SystemDiagnosticsProcessPackageVersion>
<SystemDiagnosticsTraceSourcePackageVersion>4.3.0</SystemDiagnosticsTraceSourcePackageVersion>
<SystemIoCompressionPackageVersion>4.3.0</SystemIoCompressionPackageVersion>
@ -109,44 +101,46 @@
<!-- Visual Studio packages -->
<EnvDTE80PackageVersion>8.0.1</EnvDTE80PackageVersion>
<MicrosoftVisualFSharpMicrosoftVisualStudioShellUIInternalPackageVersion>14.0.25420</MicrosoftVisualFSharpMicrosoftVisualStudioShellUIInternalPackageVersion>
<MicrosoftVisualStudioCoreUtilityPackageVersion>15.8.525</MicrosoftVisualStudioCoreUtilityPackageVersion>
<MicrosoftVisualStudioComponentModelHostPackageVersion>15.0.26201-alpha</MicrosoftVisualStudioComponentModelHostPackageVersion>
<MicrosoftVisualStudioCoreUtilityPackageVersion>16.0.467</MicrosoftVisualStudioCoreUtilityPackageVersion>
<MicrosoftVisualStudioComponentModelHostPackageVersion>16.0.467</MicrosoftVisualStudioComponentModelHostPackageVersion>
<MicrosoftVisualStudioDesignerInterfacesPackageVersion>1.1.4322</MicrosoftVisualStudioDesignerInterfacesPackageVersion>
<MicrosoftVisualStudioEditorPackageVersion>15.8.525</MicrosoftVisualStudioEditorPackageVersion>
<MicrosoftVisualStudioImagingPackageVersion>15.0.26201</MicrosoftVisualStudioImagingPackageVersion>
<MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>15.8.525</MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>
<MicrosoftVisualStudioLanguagePackageVersion>15.8.525</MicrosoftVisualStudioLanguagePackageVersion>
<MicrosoftVisualStudioLanguageIntellisensePackageVersion>15.8.525</MicrosoftVisualStudioLanguageIntellisensePackageVersion>
<MicrosoftVisualStudioManagedInterfacesPackageVersion>8.0.50727</MicrosoftVisualStudioManagedInterfacesPackageVersion>
<MicrosoftVisualStudioEditorPackageVersion>16.0.467</MicrosoftVisualStudioEditorPackageVersion>
<MicrosoftVisualStudioImageCatalogPackageVersion>16.0.28727</MicrosoftVisualStudioImageCatalogPackageVersion>
<MicrosoftVisualStudioImagingPackageVersion>16.0.28729</MicrosoftVisualStudioImagingPackageVersion>
<MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>16.0.467</MicrosoftVisualStudioLanguageStandardClassificationPackageVersion>
<MicrosoftVisualStudioLanguagePackageVersion>16.0.467</MicrosoftVisualStudioLanguagePackageVersion>
<MicrosoftVisualStudioLanguageIntellisensePackageVersion>16.0.467</MicrosoftVisualStudioLanguageIntellisensePackageVersion>
<MicrosoftVisualStudioManagedInterfacesPackageVersion>8.0.50728</MicrosoftVisualStudioManagedInterfacesPackageVersion>
<MicrosoftVisualStudioOLEInteropPackageVersion>7.10.6071</MicrosoftVisualStudioOLEInteropPackageVersion>
<MicrosoftVisualStudioPackageLanguageService150PackageVersion>15.0.26201</MicrosoftVisualStudioPackageLanguageService150PackageVersion>
<MicrosoftVisualStudioProjectAggregatorPackageVersion>8.0.50727</MicrosoftVisualStudioProjectAggregatorPackageVersion>
<MicrosoftVisualStudioPackageLanguageService150PackageVersion>16.0.28729</MicrosoftVisualStudioPackageLanguageService150PackageVersion>
<MicrosoftVisualStudioProjectAggregatorPackageVersion>8.0.50728</MicrosoftVisualStudioProjectAggregatorPackageVersion>
<MicrosoftVisualStudioProjectSystemVersion>16.0.201-pre-g7d366164d0</MicrosoftVisualStudioProjectSystemVersion>
<MicrosoftVisualStudioProjectSystemManagedVersion>2.3.6152103</MicrosoftVisualStudioProjectSystemManagedVersion>
<MicrosoftVisualStudioShell140PackageVersion>14.3.25407</MicrosoftVisualStudioShell140PackageVersion>
<MicrosoftVisualStudioShell150PackageVersion>15.0.26201</MicrosoftVisualStudioShell150PackageVersion>
<MicrosoftVisualStudioShellDesignPackageVersion>15.0.26201</MicrosoftVisualStudioShellDesignPackageVersion>
<MicrosoftVisualStudioShellFrameworkPackageVersion>15.9.28307</MicrosoftVisualStudioShellFrameworkPackageVersion>
<MicrosoftVisualStudioShell150PackageVersion>16.0.28729</MicrosoftVisualStudioShell150PackageVersion>
<MicrosoftVisualStudioShellDesignPackageVersion>16.0.28729</MicrosoftVisualStudioShellDesignPackageVersion>
<MicrosoftVisualStudioShellFrameworkPackageVersion>16.0.28729</MicrosoftVisualStudioShellFrameworkPackageVersion>
<MicrosoftVisualStudioShellImmutable100PackageVersion>10.0.30319</MicrosoftVisualStudioShellImmutable100PackageVersion>
<MicrosoftVisualStudioShellImmutable110PackageVersion>11.0.50727</MicrosoftVisualStudioShellImmutable110PackageVersion>
<MicrosoftVisualStudioShellImmutable150PackageVersion>15.0.25123-Dev15Preview</MicrosoftVisualStudioShellImmutable150PackageVersion>
<MicrosoftVisualStudioShellInteropPackageVersion>7.10.6072</MicrosoftVisualStudioShellInteropPackageVersion>
<MicrosoftVisualStudioShellInterop80PackageVersion>8.0.50727</MicrosoftVisualStudioShellInterop80PackageVersion>
<MicrosoftVisualStudioShellInterop90PackageVersion>9.0.30729</MicrosoftVisualStudioShellInterop90PackageVersion>
<MicrosoftVisualStudioShellInterop100PackageVersion>10.0.30319</MicrosoftVisualStudioShellInterop100PackageVersion>
<MicrosoftVisualStudioShellInterop110PackageVersion>11.0.61030</MicrosoftVisualStudioShellInterop110PackageVersion>
<MicrosoftVisualStudioShellInterop120PackageVersion>12.0.30110</MicrosoftVisualStudioShellInterop120PackageVersion>
<MicrosoftVisualStudioTextDataPackageVersion>15.8.525</MicrosoftVisualStudioTextDataPackageVersion>
<MicrosoftVisualStudioShellInterop80PackageVersion>8.0.50728</MicrosoftVisualStudioShellInterop80PackageVersion>
<MicrosoftVisualStudioShellInterop90PackageVersion>9.0.30730</MicrosoftVisualStudioShellInterop90PackageVersion>
<MicrosoftVisualStudioShellInterop100PackageVersion>10.0.30320</MicrosoftVisualStudioShellInterop100PackageVersion>
<MicrosoftVisualStudioShellInterop110PackageVersion>11.0.61031</MicrosoftVisualStudioShellInterop110PackageVersion>
<MicrosoftVisualStudioShellInterop120PackageVersion>12.0.30111</MicrosoftVisualStudioShellInterop120PackageVersion>
<MicrosoftVisualStudioTextDataPackageVersion>16.0.467</MicrosoftVisualStudioTextDataPackageVersion>
<MicrosoftVisualStudioTextManagerInteropPackageVersion>7.10.6071</MicrosoftVisualStudioTextManagerInteropPackageVersion>
<MicrosoftVisualStudioTextManagerInterop80PackageVersion>8.0.50727</MicrosoftVisualStudioTextManagerInterop80PackageVersion>
<MicrosoftVisualStudioTextManagerInterop100PackageVersion>10.0.30319</MicrosoftVisualStudioTextManagerInterop100PackageVersion>
<MicrosoftVisualStudioTextManagerInterop80PackageVersion>8.0.50728</MicrosoftVisualStudioTextManagerInterop80PackageVersion>
<MicrosoftVisualStudioTextManagerInterop100PackageVersion>10.0.30320</MicrosoftVisualStudioTextManagerInterop100PackageVersion>
<MicrosoftVisualStudioTextManagerInterop120PackageVersion>12.0.30112</MicrosoftVisualStudioTextManagerInterop120PackageVersion>
<MicrosoftVisualStudioTextUIPackageVersion>15.8.525</MicrosoftVisualStudioTextUIPackageVersion>
<MicrosoftVisualStudioTextUIWpfPackageVersion>15.8.525</MicrosoftVisualStudioTextUIWpfPackageVersion>
<MicrosoftVisualStudioThreadingPackageVersion>15.8.209</MicrosoftVisualStudioThreadingPackageVersion>
<MicrosoftVisualStudioUtilitiesPackageVersion>15.0.26201</MicrosoftVisualStudioUtilitiesPackageVersion>
<MicrosoftVisualStudioValidationPackageVersion>15.3.15</MicrosoftVisualStudioValidationPackageVersion>
<MicrosoftVisualStudioTextUIPackageVersion>16.0.467</MicrosoftVisualStudioTextUIPackageVersion>
<MicrosoftVisualStudioTextUIWpfPackageVersion>16.0.467</MicrosoftVisualStudioTextUIWpfPackageVersion>
<MicrosoftVisualStudioThreadingPackageVersion>16.0.102</MicrosoftVisualStudioThreadingPackageVersion>
<MicrosoftVisualStudioUtilitiesPackageVersion>16.0.28729</MicrosoftVisualStudioUtilitiesPackageVersion>
<MicrosoftVisualStudioValidationPackageVersion>15.3.58</MicrosoftVisualStudioValidationPackageVersion>
<MicrosoftVisualStudioWCFReferenceInteropPackageVersion>9.0.30729</MicrosoftVisualStudioWCFReferenceInteropPackageVersion>
<MicrosoftVSSDKBuildToolsVersion>15.7.109</MicrosoftVSSDKBuildToolsVersion>
<MicrosoftVSSDKBuildToolsVersion>16.0.2264</MicrosoftVSSDKBuildToolsVersion>
<VSSDKDebuggerVisualizersPackageVersion>12.0.4</VSSDKDebuggerVisualizersPackageVersion>
<VSSDKVSLangProjPackageVersion>7.0.4</VSSDKVSLangProjPackageVersion>
<VSSDKVSLangProj8PackageVersion>8.0.4</VSSDKVSLangProj8PackageVersion>

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

@ -13,10 +13,10 @@ $binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $false }
$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
$bootstrapDir = if (Test-Path variable:bootstrapDir) { $bootstrapDir } else { "" }
$bootstrapConfiguration = if (Test-Path variable:bootstrapConfiguration) { $bootstrapConfiguration } else { "Proto" }
$bootstrapTfm = if (Test-Path variable:bootstrapTfm) { $bootstrapTfm } else { "net46" }
$bootstrapTfm = if (Test-Path variable:bootstrapTfm) { $bootstrapTfm } else { "net472" }
$properties = if (Test-Path variable:properties) { $properties } else { @() }
function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net46", [string]$rid = "", [bool]$published = $false) {
function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [string]$configuration = $script:configuration, [string]$tfm = "net472", [string]$rid = "", [bool]$published = $false) {
$projectName = if ($projectName -ne "") { $projectName } else { [System.IO.Path]::GetFileNameWithoutExtension($fileName) }
$publishDir = if ($published) { "publish\" } else { "" }
$ridDir = if ($rid -ne "") { "$rid\" } else { "" }

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

@ -240,9 +240,10 @@ InitializeDotNetCli $restore
BuildSolution
if [[ "$test_core_clr" == true ]]; then
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework netcoreapp2.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework netcoreapp2.0
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework netcoreapp2.0
coreclrtestframework=netcoreapp2.1
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework $coreclrtestframework
fi
ExitWithExitCode 0

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

@ -29,6 +29,9 @@
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>

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

@ -28,6 +28,9 @@
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>

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

@ -7,10 +7,12 @@
<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DefaultFSharpPackageVersion>4.1.19</DefaultFSharpPackageVersion>
<NoWarn>$(NoWarn);44;75;</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- Tests won't run without this, at least on OSX, see https://github.com/NuGet/Home/issues/4837#issuecomment-354536302 -->
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">

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

@ -639,6 +639,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
</ItemGroup>

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

@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
</ItemGroup>

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

@ -8,6 +8,7 @@ open FSharp.Compiler.QuickParse
let checker = FSharpChecker.Create()
let parseWithTypeInfo (file, input) =
let input = FSharp.Compiler.Text.SourceText.ofString input
let checkOptions, _errors = checker.GetProjectOptionsFromScript(file, input) |> Async.RunSynchronously
let parsingOptions, _errors = checker.GetParsingOptionsFromProjectOptions(checkOptions)
let untypedRes = checker.ParseFile(file, input, parsingOptions) |> Async.RunSynchronously

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

@ -15,6 +15,8 @@
<ItemGroup>
<Reference Include="System.Runtime.Remoting" />
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">

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

@ -17,6 +17,8 @@
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">

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

@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">

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

@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">

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

@ -11,7 +11,7 @@ let checker = FSharpChecker.Create()
// Get untyped tree for a specified input
let getUntypedTree (file, input) =
let parsingOptions = { FSharpParsingOptions.Default with SourceFiles = [| file |] }
let untypedRes = checker.ParseFile(file, input, parsingOptions) |> Async.RunSynchronously
let untypedRes = checker.ParseFile(file, FSharp.Compiler.Text.SourceText.ofString input, parsingOptions) |> Async.RunSynchronously
match untypedRes.ParseTree with
| Some tree -> tree
| None -> failwith "Something went wrong during parsing!"

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

@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.29" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">

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

@ -2,7 +2,7 @@
"tools": {
"dotnet": "2.1.504",
"vs": {
"version": "15.9",
"version": "16.0",
"components": [
"Microsoft.Net.Core.Component.SDK.2.1",
"Microsoft.VisualStudio.Component.FSharp"

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

@ -7,15 +7,15 @@
<ItemGroup>
<Projects Include="src\fsharp\FSharp.Build\FSharp.Build.fsproj">
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net46</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net472</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp2.1</AdditionalProperties>
</Projects>
<Projects Include="src\fsharp\fsc\fsc.fsproj">
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net46</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net472</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp2.1</AdditionalProperties>
</Projects>
<Projects Include="src\fsharp\fsi\fsi.fsproj">
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net46</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' != 'Unix'">TargetFramework=net472</AdditionalProperties>
<AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp2.1</AdditionalProperties>
</Projects>
</ItemGroup>

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

@ -1,3 +1,3 @@
@echo off
%~dp0..\artifacts\bin\fsi\Release\net46\fsi.exe %~dp0VerifyAllTranslations.fsx -- %~dp0
%~dp0..\artifacts\bin\fsi\Release\net472\fsi.exe %~dp0VerifyAllTranslations.fsx -- %~dp0

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

@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<AssetTargetFallback>net462</AssetTargetFallback><!-- type providers redist relies on this -->
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>
@ -108,7 +107,6 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Portable.FSharp.Targets"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\System.Collections.Immutable.dll"
file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\System.Reflection.Metadata.dll"
file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\System.ValueTuple.dll"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.props"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.NetSdk.targets"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.FSharp.Overrides.NetSdk.targets"

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

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>

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

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>

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

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>

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

@ -4003,6 +4003,8 @@ let OpenILModuleReaderFromBytes fileName bytes opts =
let ilModule, ilAssemblyRefs, pdb = openPE (fileName, pefile, opts.pdbDirPath, (opts.reduceMemoryUsage = ReduceMemoryFlag.Yes), opts.ilGlobals, true)
new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb)) :> ILModuleReader
let ClearAllILModuleReaderCache() = ilModuleReaderCache.Clear(ILModuleReaderCacheLockToken())
let OpenILModuleReader fileName opts =
// Pseudo-normalize the paths.
let (ILModuleReaderCacheKey (fullPath,writeStamp,_,_,_,_) as key), keyOk =

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

@ -80,6 +80,8 @@ type ILModuleReader =
/// PDB files may not be read with this option.
val internal OpenILModuleReader: string -> ILReaderOptions -> ILModuleReader
val internal ClearAllILModuleReaderCache : unit -> unit
/// Open a binary reader based on the given bytes.
val internal OpenILModuleReaderFromBytes: fileNameForDebugOutput:string -> assemblyContents: byte[] -> options: ILReaderOptions -> ILModuleReader

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

@ -3,7 +3,7 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSCoreVersion>4.5.0.0</FSCoreVersion>
<FSCoreVersion>4.6.0.0</FSCoreVersion>
<OutputPath>$(MSBuildThisFileDirectory)../../BuildFromSource/$(Configuration)/bin</OutputPath>
<FSharpSourcesRoot>$(MSBuildThisFileDirectory)..</FSharpSourcesRoot>

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

@ -8,7 +8,7 @@ open System.Reflection
[<assembly:AssemblyTitle("FSharp.Build.dll")>]
[<assembly:AssemblyCopyright("\169 Microsoft Corporation. All Rights Reserved.")>]
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
[<assembly:AssemblyInformationalVersion("10.2.0.0")>]
[<assembly:AssemblyVersion("10.2.0.0")>]
[<assembly:AssemblyInformationalVersion("10.4.0.0")>]
[<assembly:AssemblyVersion("10.4.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.22.0")>]
do()

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

@ -10,7 +10,7 @@ open System.Runtime.InteropServices
[<assembly:AssemblyCopyright("\169 Microsoft Corporation. All Rights Reserved.")>]
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
[<assembly:ComVisible(false)>]
[<assembly:AssemblyInformationalVersion("10.2.0.0")>]
[<assembly:AssemblyVersion("10.2.0.0")>]
[<assembly:AssemblyInformationalVersion("10.4.0.0")>]
[<assembly:AssemblyVersion("10.4.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.22.0")>]
do()

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

@ -10,7 +10,7 @@ open System.Runtime.InteropServices
[<assembly:AssemblyCopyright("\169 Microsoft Corporation. All Rights Reserved.")>]
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
[<assembly:ComVisible(false)>]
[<assembly:AssemblyInformationalVersion("10.2.0.0")>]
[<assembly:AssemblyVersion("10.2.0.0")>]
[<assembly:AssemblyInformationalVersion("10.4.0.0")>]
[<assembly:AssemblyVersion("10.4.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.22.0")>]
do()

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

@ -20,7 +20,7 @@
<PackageAuthors Condition="'$(PackageAuthors)' == ''" >Microsoft and F# Software Foundation</PackageAuthors>
<PackageTags Condition="'$(PackageTags)' == ''" >Visual F# Compiler FSharp functional programming</PackageTags>
<PreReleaseSuffix Condition="'$(PreRelease)' != 'false'">-rc-$(BuildRevision.Trim())-0</PreReleaseSuffix>
<PackageVersion>10.2.0$(PreReleaseSuffix)</PackageVersion>
<PackageVersion>10.4.0$(PreReleaseSuffix)</PackageVersion>
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)"</PackageProperties>
</PropertyGroup>

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

@ -16,8 +16,8 @@ open System.Runtime.InteropServices
[<assembly:AssemblyFlags(System.Reflection.AssemblyNameFlags.Retargetable)>]
#endif
[<assembly:AssemblyInformationalVersion("4.5.0.0")>]
[<assembly:AssemblyVersion("4.5.0.0")>]
[<assembly:AssemblyInformationalVersion("4.6.0.0")>]
[<assembly:AssemblyVersion("4.6.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.23.0")>]
do()

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

@ -10,7 +10,7 @@ open System.Runtime.InteropServices
[<assembly:AssemblyCopyright("\169 Microsoft Corporation. All Rights Reserved.")>]
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
[<assembly:ComVisible(false)>]
[<assembly:AssemblyInformationalVersion("10.2.0.0")>]
[<assembly:AssemblyVersion("10.2.0.0")>]
[<assembly:AssemblyInformationalVersion("10.4.0.0")>]
[<assembly:AssemblyVersion("10.4.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.22.0")>]
do()

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

@ -7,7 +7,7 @@ open System.Reflection
[<assembly:AssemblyTitle("fsi.exe")>]
[<assembly:AssemblyCopyright("\169 Microsoft Corporation. All Rights Reserved.")>]
[<assembly:AssemblyProduct("Microsoft\174 F#")>]
[<assembly:AssemblyInformationalVersion("10.2.0.0")>]
[<assembly:AssemblyVersion("10.2.0.0")>]
[<assembly:AssemblyInformationalVersion("10.4.0.0")>]
[<assembly:AssemblyVersion("10.4.0.0")>]
[<assembly:AssemblyFileVersion("2018.05.22.0")>]
do()

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

@ -54,15 +54,17 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe
let (offset, fmt) =
match context with
| Some context ->
let length = context.Source.Length
if m.EndLine < context.LineStartPositions.Length then
let startIndex = context.LineStartPositions.[m.StartLine-1] + m.StartColumn
let endIndex = context.LineStartPositions.[m.EndLine-1] + m.EndColumn - 1
if startIndex < length-3 && context.Source.[startIndex..startIndex+2] = "\"\"\"" then
(3, context.Source.[startIndex+3..endIndex-3])
elif startIndex < length-2 && context.Source.[startIndex..startIndex+1] = "@\"" then
(2, context.Source.[startIndex+2..endIndex-1])
else (1, context.Source.[startIndex+1..endIndex-1])
let sourceText = context.SourceText
let lineStartPositions = context.LineStartPositions
let length = sourceText.Length
if m.EndLine < lineStartPositions.Length then
let startIndex = lineStartPositions.[m.StartLine-1] + m.StartColumn
let endIndex = lineStartPositions.[m.EndLine-1] + m.EndColumn - 1
if startIndex < length-3 && sourceText.SubTextEquals("\"\"\"", startIndex) then
(3, sourceText.GetSubTextString(startIndex + 3, endIndex - startIndex))
elif startIndex < length-2 && sourceText.SubTextEquals("@\"", startIndex) then
(2, sourceText.GetSubTextString(startIndex + 2, endIndex + 1 - startIndex))
else (1, sourceText.GetSubTextString(startIndex + 1, endIndex - startIndex))
else (1, fmt)
| None -> (1, fmt)

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

@ -14,15 +14,15 @@ open Internal.Utilities.Collections
open Internal.Utilities.Filename
open Internal.Utilities.Text
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL.ILBinaryReader
open FSharp.Compiler.AbstractIL.Internal
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.AbstractIL.Internal
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.AbstractIL.Extensions.ILX
open FSharp.Compiler.AbstractIL.Diagnostics
open FSharp.Compiler.AbstractIL.Diagnostics
open FSharp.Compiler
open FSharp.Compiler
open FSharp.Compiler.Ast
open FSharp.Compiler.AttributeChecking
open FSharp.Compiler.ConstraintSolver
@ -44,6 +44,7 @@ open FSharp.Compiler.TypeChecker
open FSharp.Compiler.Tast
open FSharp.Compiler.Tastops
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Text
open FSharp.Compiler.DotNetFrameworkDependencies
@ -599,7 +600,7 @@ let getErrorString key = SR.GetString key
let (|InvalidArgument|_|) (exn: exn) = match exn with :? ArgumentException as e -> Some e.Message | _ -> None
let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) (suggestNames: bool) =
let rec OutputExceptionR (os: StringBuilder) error =
@ -643,16 +644,16 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
let t1, t2, _cxs = NicePrint.minimalStringsOfTwoTypes denv t1 t2
match contextInfo with
| ContextInfo.IfExpression range when range = m -> os.Append(FSComp.SR.ifExpression(t1, t2)) |> ignore
| ContextInfo.CollectionElement (isArray, range) when range = m ->
| ContextInfo.IfExpression range when Range.equals range m -> os.Append(FSComp.SR.ifExpression(t1, t2)) |> ignore
| ContextInfo.CollectionElement (isArray, range) when Range.equals range m ->
if isArray then
os.Append(FSComp.SR.arrayElementHasWrongType(t1, t2)) |> ignore
else
os.Append(FSComp.SR.listElementHasWrongType(t1, t2)) |> ignore
| ContextInfo.OmittedElseBranch range when range = m -> os.Append(FSComp.SR.missingElseBranch(t2)) |> ignore
| ContextInfo.ElseBranchResult range when range = m -> os.Append(FSComp.SR.elseBranchHasWrongType(t1, t2)) |> ignore
| ContextInfo.FollowingPatternMatchClause range when range = m -> os.Append(FSComp.SR.followingPatternMatchClauseHasWrongType(t1, t2)) |> ignore
| ContextInfo.PatternMatchGuard range when range = m -> os.Append(FSComp.SR.patternMatchGuardIsNotBool(t2)) |> ignore
| ContextInfo.OmittedElseBranch range when Range.equals range m -> os.Append(FSComp.SR.missingElseBranch(t2)) |> ignore
| ContextInfo.ElseBranchResult range when Range.equals range m -> os.Append(FSComp.SR.elseBranchHasWrongType(t1, t2)) |> ignore
| ContextInfo.FollowingPatternMatchClause range when Range.equals range m -> os.Append(FSComp.SR.followingPatternMatchClauseHasWrongType(t1, t2)) |> ignore
| ContextInfo.PatternMatchGuard range when Range.equals range m -> os.Append(FSComp.SR.patternMatchGuardIsNotBool(t2)) |> ignore
| _ -> os.Append(ConstraintSolverTypesNotInEqualityRelation2E().Format t1 t2) |> ignore
if m.StartLine <> m2.StartLine then
os.Append(SeeAlsoE().Format (stringOfRange m)) |> ignore
@ -680,16 +681,16 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
&& typeEquiv g t2 t2' ->
let t1, t2, tpcs = NicePrint.minimalStringsOfTwoTypes denv t1 t2
match contextInfo with
| ContextInfo.IfExpression range when range = m -> os.Append(FSComp.SR.ifExpression(t1, t2)) |> ignore
| ContextInfo.CollectionElement (isArray, range) when range = m ->
| ContextInfo.IfExpression range when Range.equals range m -> os.Append(FSComp.SR.ifExpression(t1, t2)) |> ignore
| ContextInfo.CollectionElement (isArray, range) when Range.equals range m ->
if isArray then
os.Append(FSComp.SR.arrayElementHasWrongType(t1, t2)) |> ignore
else
os.Append(FSComp.SR.listElementHasWrongType(t1, t2)) |> ignore
| ContextInfo.OmittedElseBranch range when range = m -> os.Append(FSComp.SR.missingElseBranch(t2)) |> ignore
| ContextInfo.ElseBranchResult range when range = m -> os.Append(FSComp.SR.elseBranchHasWrongType(t1, t2)) |> ignore
| ContextInfo.FollowingPatternMatchClause range when range = m -> os.Append(FSComp.SR.followingPatternMatchClauseHasWrongType(t1, t2)) |> ignore
| ContextInfo.PatternMatchGuard range when range = m -> os.Append(FSComp.SR.patternMatchGuardIsNotBool(t2)) |> ignore
| ContextInfo.OmittedElseBranch range when Range.equals range m -> os.Append(FSComp.SR.missingElseBranch(t2)) |> ignore
| ContextInfo.ElseBranchResult range when Range.equals range m -> os.Append(FSComp.SR.elseBranchHasWrongType(t1, t2)) |> ignore
| ContextInfo.FollowingPatternMatchClause range when Range.equals range m -> os.Append(FSComp.SR.followingPatternMatchClauseHasWrongType(t1, t2)) |> ignore
| ContextInfo.PatternMatchGuard range when Range.equals range m -> os.Append(FSComp.SR.patternMatchGuardIsNotBool(t2)) |> ignore
| ContextInfo.TupleInRecordFields ->
os.Append(ErrorFromAddingTypeEquation1E().Format t2 t1 tpcs) |> ignore
os.Append(System.Environment.NewLine + FSComp.SR.commaInsteadOfSemicolonInRecord()) |> ignore
@ -824,9 +825,10 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
| UndefinedName(_, k, id, suggestionsF) ->
os.Append(k (DecompileOpName id.idText)) |> ignore
let filtered = ErrorResolutionHints.FilterPredictions id.idText suggestionsF
if List.isEmpty filtered |> not then
os.Append(ErrorResolutionHints.FormatPredictions DecompileOpName filtered) |> ignore
if suggestNames then
let filtered = ErrorResolutionHints.FilterPredictions suggestionsF id.idText
if List.isEmpty filtered |> not then
os.Append(ErrorResolutionHints.FormatPredictions DecompileOpName filtered) |> ignore
| InternalUndefinedItemRef(f, smr, ccuName, s) ->
@ -1364,9 +1366,10 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
| ErrorWithSuggestions ((_, s), _, idText, suggestionF) ->
os.Append(DecompileOpName s) |> ignore
let filtered = ErrorResolutionHints.FilterPredictions idText suggestionF
if List.isEmpty filtered |> not then
os.Append(ErrorResolutionHints.FormatPredictions DecompileOpName filtered) |> ignore
if suggestNames then
let filtered = ErrorResolutionHints.FilterPredictions suggestionF idText
if List.isEmpty filtered |> not then
os.Append(ErrorResolutionHints.FormatPredictions DecompileOpName filtered) |> ignore
| NumberedError ((_, s), _) -> os.Append(s) |> ignore
@ -1581,11 +1584,11 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) =
OutputExceptionR os (err.Exception)
// remove any newlines and tabs
let OutputPhasedDiagnostic (os: System.Text.StringBuilder) (err: PhasedDiagnostic) (flattenErrors: bool) =
// remove any newlines and tabs
let OutputPhasedDiagnostic (os: System.Text.StringBuilder) (err: PhasedDiagnostic) (flattenErrors: bool) (suggestNames: bool) =
let buf = new System.Text.StringBuilder()
OutputPhasedErrorR buf err
OutputPhasedErrorR buf err suggestNames
let s = if flattenErrors then ErrorLogger.NormalizeErrorString (buf.ToString()) else buf.ToString()
os.Append(s) |> ignore
@ -1635,9 +1638,9 @@ type Diagnostic =
| Long of bool * DiagnosticDetailedInfo
/// returns sequence that contains Diagnostic for the given error + Diagnostic for all related errors
let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err: PhasedDiagnostic) =
let outputWhere (showFullPaths, errorStyle) m: DiagnosticLocation =
if m = rangeStartup || m = rangeCmdArgs then
let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err: PhasedDiagnostic, suggestNames: bool) =
let outputWhere (showFullPaths, errorStyle) m: DiagnosticLocation =
if Range.equals m rangeStartup || Range.equals m rangeCmdArgs then
{ Range = m; TextRepresentation = ""; IsEmpty = true; File = "" }
else
let file = m.FileName
@ -1672,7 +1675,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
| ErrorStyle.VSErrors ->
// Show prefix only for real files. Otherwise, we just want a truncated error like:
// parse error FS0031: blah blah
if m<>range0 && m<>rangeStartup && m<>rangeCmdArgs then
if not (Range.equals m range0) && not (Range.equals m rangeStartup) && not (Range.equals m rangeCmdArgs) then
let file = file.Replace("/", "\\")
let m = mkRange m.FileName (mkPos m.StartLine (m.StartColumn + 1)) (mkPos m.EndLine (m.EndColumn + 1) )
sprintf "%s(%d,%d,%d,%d): " file m.StartLine m.StartColumn m.EndLine m.EndColumn, m, file
@ -1708,7 +1711,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
let canonical = OutputCanonicalInformation(err.Subcategory(), GetDiagnosticNumber mainError)
let message =
let os = System.Text.StringBuilder()
OutputPhasedDiagnostic os mainError flattenErrors
OutputPhasedDiagnostic os mainError flattenErrors suggestNames
os.ToString()
let entry: DiagnosticDetailedInfo = { Location = where; Canonical = canonical; Message = message }
@ -1723,7 +1726,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
let relCanonical = OutputCanonicalInformation(err.Subcategory(), GetDiagnosticNumber mainError) // Use main error for code
let relMessage =
let os = System.Text.StringBuilder()
OutputPhasedDiagnostic os err flattenErrors
OutputPhasedDiagnostic os err flattenErrors suggestNames
os.ToString()
let entry: DiagnosticDetailedInfo = { Location = relWhere; Canonical = relCanonical; Message = relMessage}
@ -1731,7 +1734,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
| _ ->
let os = System.Text.StringBuilder()
OutputPhasedDiagnostic os err flattenErrors
OutputPhasedDiagnostic os err flattenErrors suggestNames
errors.Add( Diagnostic.Short(isError, os.ToString()) )
relatedErrors |> List.iter OutputRelatedError
@ -1752,7 +1755,8 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt
/// prints error and related errors to the specified StringBuilder
let rec OutputDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError) os (err: PhasedDiagnostic) =
let errors = CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err)
// 'true' for "suggestNames" is passed last here because we want to report suggestions in fsc.exe and fsi.exe, just not in regular IDE usage.
let errors = CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err, true)
for e in errors do
Printf.bprintf os "\n"
match e with
@ -1782,7 +1786,6 @@ let OutputDiagnosticContext prefix fileLineFn os err =
let (++) x s = x @ [s]
//----------------------------------------------------------------------------
// General file name resolver
//--------------------------------------------------------------------------
@ -2392,12 +2395,12 @@ type TcConfigBuilder =
member tcConfigB.AddReferencedAssemblyByPath (m, path) =
if FileSystem.IsInvalidPathShim(path) then
warning(Error(FSComp.SR.buildInvalidAssemblyName(path), m))
elif not (tcConfigB.referencedDLLs |> List.exists (fun ar2 -> m=ar2.Range && path=ar2.Text)) then // NOTE: We keep same paths if range is different.
elif not (tcConfigB.referencedDLLs |> List.exists (fun ar2 -> Range.equals m ar2.Range && path=ar2.Text)) then // NOTE: We keep same paths if range is different.
let projectReference = tcConfigB.projectReferences |> List.tryPick (fun pr -> if pr.FileName = path then Some pr else None)
tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs ++ AssemblyReference(m, path, projectReference)
member tcConfigB.RemoveReferencedAssemblyByPath (m, path) =
tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs |> List.filter (fun ar-> ar.Range <> m || ar.Text <> path)
tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs |> List.filter (fun ar -> not (Range.equals ar.Range m) || ar.Text <> path)
static member SplitCommandLineResourceInfo (ri: string) =
let p = ri.IndexOf ','
@ -2542,7 +2545,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
r, Some(filename)
else
// If the file doesn't exist, let reference resolution logic report the error later...
defaultCoreLibraryReference, if r.Range =rangeStartup then Some(filename) else None
defaultCoreLibraryReference, if Range.equals r.Range rangeStartup then Some(filename) else None
match data.referencedDLLs |> List.filter (fun assemblyReference -> assemblyReference.SimpleAssemblyNameIs libraryName) with
| [r] -> nameOfDll r
| [] ->
@ -2899,7 +2902,13 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
// file is included in the search path. This should ideally already be one of the search paths, but
// during some global checks it won't be. We append to the end of the search list so that this is the last
// place that is checked.
if m <> range0 && m <> rangeStartup && m <> rangeCmdArgs && FileSystem.IsPathRootedShim m.FileName then
let isPoundRReference (r: range) =
not (Range.equals r range0) &&
not (Range.equals r rangeStartup) &&
not (Range.equals r rangeCmdArgs) &&
FileSystem.IsPathRootedShim r.FileName
if isPoundRReference m then
tcConfig.GetSearchPathsForLibraryFiles() @ [Path.GetDirectoryName(m.FileName)]
else
tcConfig.GetSearchPathsForLibraryFiles()
@ -4840,7 +4849,7 @@ module private ScriptPreprocessClosure =
open Internal.Utilities.Text.Lexing
/// Represents an input to the closure finding process
type ClosureSource = ClosureSource of filename: string * referenceRange: range * sourceText: string * parseRequired: bool
type ClosureSource = ClosureSource of filename: string * referenceRange: range * sourceText: ISourceText * parseRequired: bool
/// Represents an output of the closure finding process
type ClosureFile = ClosureFile of string * range * ParsedInput option * (PhasedDiagnostic * bool) list * (PhasedDiagnostic * bool) list * (string * range) list // filename, range, errors, warnings, nowarns
@ -4856,8 +4865,8 @@ module private ScriptPreprocessClosure =
/// Parse a script from source.
let ParseScriptText
(filename: string, source: string, tcConfig: TcConfig, codeContext,
lexResourceManager: Lexhelp.LexResourceManager, errorLogger: ErrorLogger) =
(filename: string, sourceText: ISourceText, tcConfig: TcConfig, codeContext,
lexResourceManager: Lexhelp.LexResourceManager, errorLogger: ErrorLogger) =
// fsc.exe -- COMPILED\!INTERACTIVE
// fsi.exe -- !COMPILED\INTERACTIVE
@ -4869,7 +4878,7 @@ module private ScriptPreprocessClosure =
| CodeContext.CompilationAndEvaluation -> ["INTERACTIVE"]
| CodeContext.Compilation -> ["COMPILED"]
| CodeContext.Editing -> "EDITING" :: (if IsScript filename then ["INTERACTIVE"] else ["COMPILED"])
let lexbuf = UnicodeLexing.StringAsLexbuf source
let lexbuf = UnicodeLexing.SourceTextAsLexbuf(sourceText)
let isLastCompiland = (IsScript filename), tcConfig.target.IsExe // The root compiland is last in the list of compilands.
ParseOneInputLexbuf (tcConfig, lexResourceManager, defines, lexbuf, filename, isLastCompiland, errorLogger)
@ -4920,7 +4929,7 @@ module private ScriptPreprocessClosure =
| None -> new StreamReader(stream, true)
| Some (n: int) -> new StreamReader(stream, Encoding.GetEncoding(n))
let source = reader.ReadToEnd()
[ClosureSource(filename, m, source, parseRequired)]
[ClosureSource(filename, m, SourceText.ofString source, parseRequired)]
with e ->
errorRecovery e m
[]
@ -4953,7 +4962,7 @@ module private ScriptPreprocessClosure =
let tcConfig = ref tcConfig
let observedSources = Observed()
let rec loop (ClosureSource(filename, m, source, parseRequired)) =
let rec loop (ClosureSource(filename, m, sourceText, parseRequired)) =
[ if not (observedSources.HaveSeen(filename)) then
observedSources.SetSeen(filename)
//printfn "visiting %s" filename
@ -4961,7 +4970,7 @@ module private ScriptPreprocessClosure =
let parseResult, parseDiagnostics =
let errorLogger = CapturingErrorLogger("FindClosureParse")
use _unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> errorLogger)
let result = ParseScriptText (filename, source, !tcConfig, codeContext, lexResourceManager, errorLogger)
let result = ParseScriptText (filename, sourceText, !tcConfig, codeContext, lexResourceManager, errorLogger)
result, errorLogger.Diagnostics
match parseResult with
@ -5055,7 +5064,7 @@ module private ScriptPreprocessClosure =
match GetRangeOfDiagnostic exn with
| Some m ->
// Return true if the error was *not* from a #load-ed file.
let isArgParameterWhileNotEditing = (codeContext <> CodeContext.Editing) && (m = range0 || m = rangeStartup || m = rangeCmdArgs)
let isArgParameterWhileNotEditing = (codeContext <> CodeContext.Editing) && (Range.equals m range0 || Range.equals m rangeStartup || Range.equals m rangeCmdArgs)
let isThisFileName = (0 = String.Compare(rootFilename, m.FileName, StringComparison.OrdinalIgnoreCase))
isArgParameterWhileNotEditing || isThisFileName
| None -> true
@ -5078,13 +5087,12 @@ module private ScriptPreprocessClosure =
/// Given source text, find the full load closure. Used from service.fs, when editing a script file
let GetFullClosureOfScriptText
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir,
filename, source,
codeContext, useSimpleResolution, useFsiAuxLib,
lexResourceManager: Lexhelp.LexResourceManager,
applyCommmandLineArgs, assumeDotNetFramework,
tryGetMetadataSnapshot, reduceMemoryUsage) =
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir,
filename, sourceText,
codeContext, useSimpleResolution, useFsiAuxLib,
lexResourceManager: Lexhelp.LexResourceManager,
applyCommmandLineArgs, assumeDotNetFramework,
tryGetMetadataSnapshot, reduceMemoryUsage) =
// Resolve the basic references such as FSharp.Core.dll first, before processing any #I directives in the script
//
// This is tries to mimic the action of running the script in F# Interactive - the initial context for scripting is created
@ -5105,7 +5113,7 @@ module private ScriptPreprocessClosure =
codeContext, useSimpleResolution, useFsiAuxLib, Some references0,
applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage)
let closureSources = [ClosureSource(filename, range0, source, true)]
let closureSources = [ClosureSource(filename, range0, sourceText, true)]
let closureFiles, tcConfig = FindClosureFiles(closureSources, tcConfig, codeContext, lexResourceManager)
GetLoadClosure(ctok, filename, closureFiles, tcConfig, codeContext)
@ -5124,23 +5132,26 @@ module private ScriptPreprocessClosure =
type LoadClosure with
/// Analyze a script text and find the closure of its references.
/// Used from FCS, when editing a script file.
//
/// A temporary TcConfig is created along the way, is why this routine takes so many arguments. We want to be sure to use exactly the
/// same arguments as the rest of the application.
static member ComputeClosureOfScriptText
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir,
filename: string, source: string, codeContext, useSimpleResolution: bool,
useFsiAuxLib, lexResourceManager: Lexhelp.LexResourceManager,
applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) =
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir,
filename: string, sourceText:ISourceText, codeContext, useSimpleResolution: bool,
useFsiAuxLib, lexResourceManager: Lexhelp.LexResourceManager,
applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage): LoadClosure =
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse
ScriptPreprocessClosure.GetFullClosureOfScriptText
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source,
codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager,
(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, sourceText,
codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager,
applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage)
/// Analyze a set of script files and find the closure of their references.
static member ComputeClosureOfScriptFiles
(ctok, tcConfig: TcConfig, files:(string*range) list, codeContext,
lexResourceManager: Lexhelp.LexResourceManager) =
static member ComputeClosureOfScriptFiles
(ctok, tcConfig: TcConfig, files:(string*range) list, codeContext,
lexResourceManager: Lexhelp.LexResourceManager) =
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse
ScriptPreprocessClosure.GetFullClosureOfScriptFiles (ctok, tcConfig, files, codeContext, lexResourceManager)
@ -5444,4 +5455,4 @@ let TypeCheckClosedInputSet (ctok, checkForErrors, tcConfig, tcImports, tcGlobal
// Existing public APIs delegate to newer implementations
let GetFSharpCoreLibraryName () = getFSharpCoreLibraryName
let DefaultReferencesForScriptsAndOutOfProjectSources assumeDotNetFramework = defaultReferencesForScriptsAndOutOfProjectSources assumeDotNetFramework
let DefaultReferencesForScriptsAndOutOfProjectSources assumeDotNetFramework = defaultReferencesForScriptsAndOutOfProjectSources assumeDotNetFramework

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

@ -9,14 +9,15 @@ open System.Collections.Generic
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL.ILBinaryReader
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler
open FSharp.Compiler.TypeChecker
open FSharp.Compiler.Range
open FSharp.Compiler.Ast
open FSharp.Compiler.ErrorLogger
open FSharp.Compiler.Tast
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Text
open Microsoft.FSharp.Core.CompilerServices
#if !NO_EXTENSIONTYPING
open FSharp.Compiler.ExtensionTyping
@ -82,7 +83,7 @@ val GetDiagnosticNumber: PhasedDiagnostic -> int
val SplitRelatedDiagnostics: PhasedDiagnostic -> PhasedDiagnostic * PhasedDiagnostic list
/// Output an error to a buffer
val OutputPhasedDiagnostic: StringBuilder -> PhasedDiagnostic -> flattenErrors: bool -> unit
val OutputPhasedDiagnostic: StringBuilder -> PhasedDiagnostic -> flattenErrors: bool -> suggestNames: bool -> unit
/// Output an error or warning to a buffer
val OutputDiagnostic: implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * isError:bool -> StringBuilder -> PhasedDiagnostic -> unit
@ -119,7 +120,7 @@ type Diagnostic =
| Long of bool * DiagnosticDetailedInfo
/// Part of LegacyHostedCompilerForTesting
val CollectDiagnostic: implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * warning:bool * PhasedDiagnostic -> seq<Diagnostic>
val CollectDiagnostic: implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * warning:bool * PhasedDiagnostic * suggestNames: bool -> seq<Diagnostic>
//----------------------------------------------------------------------------
// Resolve assembly references
@ -800,7 +801,7 @@ type LoadClosure =
//
/// A temporary TcConfig is created along the way, is why this routine takes so many arguments. We want to be sure to use exactly the
/// same arguments as the rest of the application.
static member ComputeClosureOfScriptText: CompilationThreadToken * legacyReferenceResolver: ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) * assumeDotNetFramework: bool * tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot * reduceMemoryUsage: ReduceMemoryFlag -> LoadClosure
static member ComputeClosureOfScriptText: CompilationThreadToken * legacyReferenceResolver: ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * filename: string * sourceText: ISourceText * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) * assumeDotNetFramework: bool * tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot * reduceMemoryUsage: ReduceMemoryFlag -> LoadClosure
/// Analyze a set of script files and find the closure of their references. The resulting references are then added to the given TcConfig.
/// Used from fsi.fs and fsc.fs, for #load and command line.

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

@ -1931,7 +1931,7 @@ and SolveTypeIsNonNullableValueType (csenv: ConstraintSolverEnv) ndeep m2 trace
| _ ->
let underlyingTy = stripTyEqnsAndMeasureEqns g ty
if isStructTy g underlyingTy then
if tyconRefEq g g.system_Nullable_tcref (tcrefOfAppTy g underlyingTy) then
if isAppTy g underlyingTy && tyconRefEq g g.system_Nullable_tcref (tcrefOfAppTy g underlyingTy) then
return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeParameterCannotBeNullable(), m, m))
else
return! ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresStructType(NicePrint.minimalStringOfType denv ty), m, m2))

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

@ -125,7 +125,7 @@ let inline protectAssemblyExplorationNoReraise dflt1 dflt2 f =
// Attach a range if this is a range dual exception.
let rec AttachRange m (exn:exn) =
if m = range0 then exn
if Range.equals m range0 then exn
else
match exn with
// Strip TargetInvocationException wrappers

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

@ -24,7 +24,7 @@ let IsInEditDistanceProximity idText suggestion =
editDistance <= threshold
/// Filters predictions based on edit distance to the given unknown identifier.
let FilterPredictions (idText:string) (suggestionF:ErrorLogger.Suggestions) =
let FilterPredictions (suggestionF:ErrorLogger.Suggestions) (idText:string) =
let uppercaseText = idText.ToUpperInvariant()
let allSuggestions = suggestionF()

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

@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Build</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
@ -36,7 +36,7 @@
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Microsoft.VisualFSharp.Type.Providers.Redist" Version="$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)" />
</ItemGroup>

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

@ -74,7 +74,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<PropertyGroup>
<DefaultValueTuplePackageVersion>4.4.0</DefaultValueTuplePackageVersion>
<DefaultFSharpCorePackageVersion>4.5.2</DefaultFSharpCorePackageVersion>
<DefaultFSharpCorePackageVersion>4.6.2</DefaultFSharpCorePackageVersion>
<ValueTupleImplicitPackageVersion>$(DefaultValueTuplePackageVersion)</ValueTupleImplicitPackageVersion>
<FSharpCoreImplicitPackageVersion>$(DefaultFSharpCorePackageVersion)</FSharpCoreImplicitPackageVersion>
</PropertyGroup>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">Parametr ToolPath není známý. Zadejte cestu k nástroji.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath unbekannt. Geben Sie den Pfad zum Tool an.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath se desconoce; especifique la ruta de acceso a la herramienta.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath est inconnu, spécifiez le chemin de l'outil.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">Il valore di ToolPath è sconosciuto. Specificare il percorso dello strumento.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath が不明です。ツールンパスを指定します。</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath를 알 수 없습니다. 도구 경로를 지정하세요.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">Właściwość ToolPath jest nieznana. Określ ścieżkę do narzędzia.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath desconhecido. Especifique o caminho para a ferramenta.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">Путь к инструменту (ToolPath) неизвестен, укажите путь к инструменту.</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath bilinmiyor; aracın yolunu belirtin.</target>
<note />
</trans-unit>
</body>

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

@ -4,7 +4,7 @@
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath 未知;请指定工具的路径。</target>
<note />
</trans-unit>
</body>

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../FSBuild.resx">
<body>
<trans-unit id="toolpathUnknown">
<source>ToolPath is unknown; specify the path to the tool.</source>
<target state="needs translation">ToolPath is unknown; specify the path to the tool.</target>
<target state="translated">ToolPath 未知; 請指定工具的路徑。</target>
<note />
</trans-unit>
</body>

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

@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Compiler.Interactive.Settings</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1182;1204</NoWarn>

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

@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Compiler.Private</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
@ -12,10 +12,17 @@
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);MSBUILD_AT_LEAST_15</DefineConstants>
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<UseAssetTargetFallback>true</UseAssetTargetFallback>
<Tailcalls>true</Tailcalls> <!-- .tail annotations always emitted for this binary, even in debug mode -->
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net472|AnyCPU'">
<Tailcalls>true</Tailcalls>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<Tailcalls>true</Tailcalls>
</PropertyGroup>
<Target Name="CopyToBuiltBin" BeforeTargets="BuiltProjectOutputGroup" AfterTargets="CoreCompile">
<PropertyGroup>
<BuildOutputGroupLocation>$(BaseOutputPath)\$(Configuration)\$(TargetFramework)</BuildOutputGroupLocation>
@ -27,7 +34,6 @@
<BuiltProjectOutputGroupKeyOutput Include="$(BuildOutputGroupLocation)\Microsoft.Build.Tasks.Core.dll" />
<BuiltProjectOutputGroupKeyOutput Include="$(BuildOutputGroupLocation)\System.Reflection.Metadata.dll" />
<BuiltProjectOutputGroupKeyOutput Include="$(BuildOutputGroupLocation)\System.Collections.Immutable.dll" />
<BuiltProjectOutputGroupKeyOutput Include="$(BuildOutputGroupLocation)\System.ValueTuple.dll" />
</ItemGroup>
</Target>
@ -50,6 +56,7 @@
<InternalsVisibleTo Include="HostedCompilerServer" />
<InternalsVisibleTo Include="FSharp.Tests.FSharpSuite" />
<InternalsVisibleTo Include="LanguageServiceProfiling" />
<InternalsVisibleTo Include="CompilerServiceBenchmarks" />
</ItemGroup>
<ItemGroup>
@ -622,6 +629,12 @@
<Compile Include="..\service\service.fs">
<Link>Service/service.fs</Link>
</Compile>
<Compile Include="..\service\ServiceErrorResolutionHints.fsi">
<Link>Service/ServiceErrorResolutionHints.fsi</Link>
</Compile>
<Compile Include="..\service\ServiceErrorResolutionHints.fs">
<Link>Service/ServiceErrorResolutionHints.fs</Link>
</Compile>
<Compile Include="..\service\ServiceInterfaceStubGenerator.fsi">
<Link>Service/ServiceInterfaceStubGenerator.fsi</Link>
</Compile>
@ -652,7 +665,7 @@
<Link>InteractiveSession/fsi.fs</Link>
</Compile>
<Compile Include="..\MSBuildReferenceResolver.fs" Condition="'$(MonoPackaging)' != 'true'">
<Compile Include="..\MSBuildReferenceResolver.fs" Condition="'$(MonoPackaging)' != 'true'">
<Link>Misc/MSBuildReferenceResolver.fs</Link>
</Compile>
<!-- an old API for testing the compiler and gathering diagnostics in-memory -->
@ -665,7 +678,7 @@
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageVersion)" />
@ -697,7 +710,6 @@
<PackageReference Include="System.Threading.Tasks.Parallel" Version="$(SystemThreadingTasksParallelPackageVersion)" />
<PackageReference Include="System.Threading.Thread" Version="$(SystemThreadingThreadPackageVersion)" />
<PackageReference Include="System.Threading.ThreadPool" Version="$(SystemThreadingThreadPoolPackageVersion)" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTuplePackageVersion)" />
</ItemGroup>
</Project>

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

@ -3,8 +3,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<NGenBinary>true</NGenBinary>
<TargetFramework>net472</TargetFramework>
<AssemblyName>FSharp.Compiler.Server.Shared</AssemblyName>
<UseFSharpProductVersion>true</UseFSharpProductVersion>
</PropertyGroup>
<ItemGroup>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../FSCore.resx">
<body>
@ -204,7 +204,7 @@
</trans-unit>
<trans-unit id="notAPermutation">
<source>The function did not compute a permutation.</source>
<target state="translated">関数は順列を計算しませんでした。</target>
<target state="translated">関数は順列をコンピューティングしませんでした。</target>
<note />
</trans-unit>
<trans-unit id="notARecordType">

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../FSCore.resx">
<body>
@ -314,7 +314,7 @@
</trans-unit>
<trans-unit id="QtmmExpectedFunction">
<source>Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'.</source>
<target state="translated">{0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 함수 응용 프로그램 또는 let 바인딩에 함수 형식이 필요합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다.</target>
<target state="translated">'{0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 함수 애플리케이션 또는 let 바인딩에 함수 형식이 필요합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다.</target>
<note />
</trans-unit>
<trans-unit id="QtmmExprNotMatchTuple">

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../FSCore.resx">
<body>
@ -514,7 +514,7 @@
</trans-unit>
<trans-unit id="QunionNeedsDiffNumArgs">
<source>F# union type requires different number of arguments</source>
<target state="translated">К# типу объединения требуется другое количество аргументов</target>
<target state="translated">Типу объединения F# требуется другое количество аргументов</target>
<note />
</trans-unit>
<trans-unit id="QwritingGetOnly">

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../FSCore.resx">
<body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../FSCore.resx">
<body>

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

@ -23,6 +23,7 @@ open FSharp.Compiler.AccessibilityLogic
open FSharp.Compiler.AttributeChecking
open FSharp.Compiler.InfoReader
open FSharp.Compiler.PrettyNaming
open FSharp.Compiler.Text
open System.Collections.Generic
#if !NO_EXTENSIONTYPING
@ -897,7 +898,7 @@ let AddResults res1 res2 =
| Exception _, Result l -> Result l
| 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, suggestions1)), Exception (UndefinedName(n2, _, id2, suggestions2)) when n1 = n2 && id1.idText = id2.idText && Range.equals id1.idRange id2.idRange ->
let suggestions = HashSet(suggestions1())
suggestions.UnionWith(suggestions2())
Exception(UndefinedName(n1, f, id1, fun () -> suggestions))
@ -1251,7 +1252,7 @@ type OpenDeclaration =
IsOwnNamespace = isOwnNamespace }
type FormatStringCheckContext =
{ Source: string
{ SourceText: ISourceText
LineStartPositions: int[] }
/// An abstract type for reporting the results of name resolution and type checking.
@ -1261,7 +1262,7 @@ type ITypecheckResultsSink =
abstract NotifyNameResolution: pos * Item * Item * TyparInst * ItemOccurence * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range * bool -> unit
abstract NotifyFormatSpecifierLocation: range * int -> unit
abstract NotifyOpenDeclaration: OpenDeclaration -> unit
abstract CurrentSource: string option
abstract CurrentSourceText: ISourceText option
abstract FormatStringCheckContext: FormatStringCheckContext option
let (|ValRefOfProp|_|) (pi: PropInfo) = pi.ArbitraryValRef
@ -1353,8 +1354,10 @@ let tyconRefDefnEq g (eref1: EntityRef) (eref2: EntityRef) =
tyconRefEq g eref1 eref2 ||
// Signature items considered equal to implementation items
eref1.DefinitionRange <> Range.rangeStartup && eref1.DefinitionRange <> Range.range0 && eref1.DefinitionRange <> Range.rangeCmdArgs &&
(eref1.DefinitionRange = eref2.DefinitionRange || eref1.SigRange = eref2.SigRange) &&
not (Range.equals eref1.DefinitionRange Range.rangeStartup) &&
not (Range.equals eref1.DefinitionRange Range.range0) &&
not (Range.equals eref1.DefinitionRange Range.rangeCmdArgs) &&
(Range.equals eref1.DefinitionRange eref2.DefinitionRange || Range.equals eref1.SigRange eref2.SigRange) &&
eref1.LogicalName = eref2.LogicalName
let valRefDefnHash (_g: TcGlobals) (vref1: ValRef) =
@ -1364,8 +1367,10 @@ let valRefDefnEq g (vref1: ValRef) (vref2: ValRef) =
valRefEq g vref1 vref2 ||
// Signature items considered equal to implementation items
vref1.DefinitionRange <> Range.rangeStartup && vref1.DefinitionRange <> Range.range0 && vref1.DefinitionRange <> Range.rangeCmdArgs &&
(vref1.DefinitionRange = vref2.DefinitionRange || vref1.SigRange = vref2.SigRange) &&
not (Range.equals vref1.DefinitionRange Range.rangeStartup) &&
not (Range.equals vref1.DefinitionRange Range.range0) &&
not (Range.equals vref1.DefinitionRange Range.rangeCmdArgs) &&
(Range.equals vref1.DefinitionRange vref2.DefinitionRange || Range.equals vref1.SigRange vref2.SigRange) &&
vref1.LogicalName = vref2.LogicalName
let unionCaseRefDefnEq g (uc1: UnionCaseRef) (uc2: UnionCaseRef) =
@ -1384,7 +1389,7 @@ let ItemsAreEffectivelyEqual g orig other =
| TType_var tp1, TType_var tp2 ->
not tp1.IsCompilerGenerated && not tp1.IsFromError &&
not tp2.IsCompilerGenerated && not tp2.IsFromError &&
tp1.Range = tp2.Range
Range.equals tp1.Range tp2.Range
| AbbrevOrAppTy tcref1, AbbrevOrAppTy tcref2 ->
tyconRefDefnEq g tcref1 tcref2
| _ -> false)
@ -1393,7 +1398,7 @@ let ItemsAreEffectivelyEqual g orig other =
valRefDefnEq g vref1 vref2
| ActivePatternCaseUse (range1, range1i, idx1), ActivePatternCaseUse (range2, range2i, idx2) ->
(idx1 = idx2) && (range1 = range2 || range1i = range2i)
(idx1 = idx2) && (Range.equals range1 range2 || Range.equals range1i range2i)
| MethodUse minfo1, MethodUse minfo2 ->
MethInfo.MethInfosUseIdenticalDefinitions minfo1 minfo2 ||
@ -1410,10 +1415,10 @@ let ItemsAreEffectivelyEqual g orig other =
| _ -> false
| Item.ArgName (id1, _, _), Item.ArgName (id2, _, _) ->
(id1.idText = id2.idText && id1.idRange = id2.idRange)
(id1.idText = id2.idText && Range.equals id1.idRange id2.idRange)
| (Item.ArgName (id, _, _), ValUse vref) | (ValUse vref, Item.ArgName (id, _, _)) ->
((id.idRange = vref.DefinitionRange || id.idRange = vref.SigRange) && id.idText = vref.DisplayName)
((Range.equals id.idRange vref.DefinitionRange || Range.equals id.idRange vref.SigRange) && id.idText = vref.DisplayName)
| Item.AnonRecdField(anon1, _, i1, _), Item.AnonRecdField(anon2, _, i2, _) -> Tastops.anonInfoEquiv anon1 anon2 && i1 = i2
@ -1520,7 +1525,7 @@ type TcSymbolUses(g, capturedNameResolutions: ResizeArray<CapturedNameResolution
member this.GetFormatSpecifierLocationsAndArity() = formatSpecifierLocations
/// An accumulator for the results being emitted into the tcSink.
type TcResultsSinkImpl(g, ?source: string) =
type TcResultsSinkImpl(g, ?sourceText: ISourceText) =
let capturedEnvs = ResizeArray<_>()
let capturedExprTypings = ResizeArray<_>()
let capturedNameResolutions = ResizeArray<_>()
@ -1536,7 +1541,7 @@ type TcResultsSinkImpl(g, ?source: string) =
new System.Collections.Generic.HashSet<range * Item>
( { new IEqualityComparer<range * Item> with
member __.GetHashCode ((m, _)) = hash m
member __.Equals ((m1, item1), (m2, item2)) = m1 = m2 && ItemsAreEffectivelyEqual g item1 item2 } )
member __.Equals ((m1, item1), (m2, item2)) = Range.equals m1 m2 && ItemsAreEffectivelyEqual g item1 item2 } )
let capturedMethodGroupResolutions = ResizeArray<_>()
let capturedOpenDeclarations = ResizeArray<OpenDeclaration>()
@ -1544,18 +1549,18 @@ type TcResultsSinkImpl(g, ?source: string) =
let formatStringCheckContext =
lazy
source |> Option.map (fun source ->
sourceText |> Option.map (fun sourceText ->
let positions =
[|
yield 0
for i in 1..source.Length do
let c = source.[i-1]
if c = '\r' && i < source.Length && source.[i] = '\n' then ()
for i in 1..sourceText.Length do
let c = sourceText.[i-1]
if c = '\r' && i < sourceText.Length && sourceText.[i] = '\n' then ()
elif c = '\r' then yield i
elif c = '\n' then yield i
yield source.Length
yield sourceText.Length
|]
{ Source = source
{ SourceText = sourceText
LineStartPositions = positions })
member this.GetResolutions() =
@ -1581,9 +1586,9 @@ type TcResultsSinkImpl(g, ?source: string) =
// results in duplication of textual variables. So we ensure we never record two name resolutions
// for the same identifier at the same location.
if allowedRange m then
if replace then
capturedNameResolutions.RemoveAll(fun cnr -> cnr.Range = m) |> ignore
capturedMethodGroupResolutions.RemoveAll(fun cnr -> cnr.Range = m) |> ignore
if replace then
capturedNameResolutions.RemoveAll(fun cnr -> Range.equals cnr.Range m) |> ignore
capturedMethodGroupResolutions.RemoveAll(fun cnr -> Range.equals cnr.Range m) |> ignore
else
let alreadyDone =
match item with
@ -1610,7 +1615,7 @@ type TcResultsSinkImpl(g, ?source: string) =
member sink.NotifyOpenDeclaration(openDeclaration) =
capturedOpenDeclarations.Add(openDeclaration)
member sink.CurrentSource = source
member sink.CurrentSourceText = sourceText
member sink.FormatStringCheckContext = formatStringCheckContext.Value
@ -1847,7 +1852,7 @@ let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQu
let mutable moduleNotFoundErrorCache = None
let moduleNotFound (modref: ModuleOrNamespaceRef) (mty: ModuleOrNamespaceType) (id: Ident) depth =
match moduleNotFoundErrorCache with
| Some (oldId, error) when oldId = id.idRange -> error
| Some (oldId, error) when Range.equals oldId id.idRange -> error
| _ ->
let suggestNames() =
mty.ModulesAndNamespacesByDemangledName
@ -2607,7 +2612,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified
} |> HashSet
match innerSearch with
| Exception (UndefinedName(0, _, id1, suggestionsF)) when id.idRange = id1.idRange ->
| Exception (UndefinedName(0, _, id1, suggestionsF)) when Range.equals id.idRange id1.idRange ->
let mergeSuggestions() =
let res = suggestEverythingInScope()
res.UnionWith(suggestionsF())
@ -3295,7 +3300,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso
match lid with
| [] | [_] -> false
| head :: ids ->
ids |> List.forall (fun id -> id.idRange = head.idRange)
ids |> List.forall (fun id -> Range.equals id.idRange head.idRange)
let callSink (refinedItem, tpinst) =
if not isFakeIdents then

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

@ -2,7 +2,7 @@
module internal FSharp.Compiler.NameResolution
open FSharp.Compiler
open FSharp.Compiler
open FSharp.Compiler.AccessibilityLogic
open FSharp.Compiler.Ast
open FSharp.Compiler.Infos
@ -14,6 +14,7 @@ open FSharp.Compiler.Tastops
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.PrettyNaming
open FSharp.Compiler.Text
/// A NameResolver is a context for name resolution. It primarily holds an InfoReader.
type NameResolver =
@ -347,7 +348,7 @@ type internal OpenDeclaration =
/// Source text and an array of line end positions, used for format string parsing
type FormatStringCheckContext =
{ /// Source text
Source: string
SourceText: ISourceText
/// Array of line start positions
LineStartPositions: int[] }
@ -370,7 +371,7 @@ type ITypecheckResultsSink =
abstract NotifyOpenDeclaration : OpenDeclaration -> unit
/// Get the current source
abstract CurrentSource : string option
abstract CurrentSourceText : ISourceText option
/// Cached line-end normalized source text and an array of line end positions, used for format string parsing
abstract FormatStringCheckContext : FormatStringCheckContext option
@ -379,7 +380,7 @@ type ITypecheckResultsSink =
type internal TcResultsSinkImpl =
/// Create a TcResultsSinkImpl
new : tcGlobals : TcGlobals * ?source:string -> TcResultsSinkImpl
new : tcGlobals : TcGlobals * ?sourceText: ISourceText -> TcResultsSinkImpl
/// Get all the resolutions reported to the sink
member GetResolutions : unit -> TcResolutions

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

@ -1808,16 +1808,23 @@ let TryDetectQueryQuoteAndRun cenv (expr: Expr) =
| _ ->
//printfn "Not eliminating because no Run found"
None
let IsSystemStringConcatOverload (methRef: ILMethodRef) =
methRef.Name = "Concat" && methRef.DeclaringTypeRef.FullName = "System.String" &&
methRef.ReturnType.BasicQualifiedName = "System.String" &&
methRef.ArgTypes |> List.forall(fun ilty -> ilty.BasicQualifiedName = "System.String")
let IsSystemStringConcatArray (methRef: ILMethodRef) =
methRef.Name = "Concat" && methRef.DeclaringTypeRef.FullName = "System.String" &&
methRef.ReturnType.BasicQualifiedName = "System.String" &&
methRef.ArgTypes.Length = 1 && methRef.ArgTypes.Head.BasicQualifiedName = "System.String[]"
let IsILMethodRefDeclaringTypeSystemString (ilg: ILGlobals) (mref: ILMethodRef) =
mref.DeclaringTypeRef.Scope.IsAssemblyRef &&
mref.DeclaringTypeRef.Scope.AssemblyRef.Name = ilg.typ_String.TypeRef.Scope.AssemblyRef.Name &&
mref.DeclaringTypeRef.BasicQualifiedName = ilg.typ_String.BasicQualifiedName
let IsILMethodRefSystemStringConcatOverload (ilg: ILGlobals) (mref: ILMethodRef) =
IsILMethodRefDeclaringTypeSystemString ilg mref &&
mref.Name = "Concat" &&
mref.ReturnType.BasicQualifiedName = ilg.typ_String.BasicQualifiedName &&
mref.ArgCount >= 2 && mref.ArgCount <= 4 && mref.ArgTypes |> List.forall(fun ilty -> ilty.BasicQualifiedName = ilg.typ_String.BasicQualifiedName)
let IsILMethodRefSystemStringConcatArray (ilg: ILGlobals) (mref: ILMethodRef) =
IsILMethodRefDeclaringTypeSystemString ilg mref &&
mref.Name = "Concat" &&
mref.ReturnType.BasicQualifiedName = ilg.typ_String.BasicQualifiedName &&
mref.ArgCount = 1 && mref.ArgTypes.Head.BasicQualifiedName = "System.String[]"
/// Optimize/analyze an expression
let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr =
@ -1944,10 +1951,10 @@ and OptimizeInterfaceImpl cenv env baseValOpt (ty, overrides) =
and MakeOptimizedSystemStringConcatCall cenv env m args =
let rec optimizeArg argExpr accArgs =
match argExpr, accArgs with
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ], _), _ when IsSystemStringConcatArray methRef ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ], _), _ when IsILMethodRefSystemStringConcatArray cenv.g.ilg methRef ->
optimizeArgs args accArgs
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, args, _), _ when IsSystemStringConcatOverload methRef ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, args, _), _ when IsILMethodRefSystemStringConcatOverload cenv.g.ilg mref ->
optimizeArgs args accArgs
// Optimize string constants, e.g. "1" + "2" will turn into "12"
@ -1977,7 +1984,7 @@ and MakeOptimizedSystemStringConcatCall cenv env m args =
mkStaticCall_String_Concat_Array cenv.g m arg
match expr with
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _) as op, tyargs, args, m) when IsSystemStringConcatOverload methRef || IsSystemStringConcatArray methRef ->
| Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _) as op, tyargs, args, m) when IsILMethodRefSystemStringConcatOverload cenv.g.ilg methRef || IsILMethodRefSystemStringConcatArray cenv.g.ilg methRef ->
OptimizeExprOpReductions cenv env (op, tyargs, args, m)
| _ ->
OptimizeExpr cenv env expr
@ -2046,9 +2053,9 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) =
| TOp.ILAsm([], [ty]), _, [a] when typeEquiv cenv.g (tyOfExpr cenv.g a) ty -> OptimizeExpr cenv env a
// Optimize calls when concatenating strings, e.g. "1" + "2" + "3" + "4" .. etc.
| TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ] when IsSystemStringConcatArray methRef ->
| TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ] when IsILMethodRefSystemStringConcatArray cenv.g.ilg mref ->
MakeOptimizedSystemStringConcatCall cenv env m args
| TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, args when IsSystemStringConcatOverload methRef ->
| TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), _, args when IsILMethodRefSystemStringConcatOverload cenv.g.ilg mref ->
MakeOptimizedSystemStringConcatCall cenv env m args
| _ ->

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

@ -1350,7 +1350,7 @@ let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (o
// If the remainder of the match boiled away to nothing interesting.
// We measure this simply by seeing if the range of the resulting expression is identical to matchm.
let spTarget =
if expr.Range = matchm then SuppressSequencePointAtTarget
if Range.equals expr.Range matchm then SuppressSequencePointAtTarget
else SequencePointAtTarget
// Make the clause that represents the remaining cases of the pattern match

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

@ -1775,7 +1775,8 @@ let isRefTy g ty =
isFunTy g ty ||
isReprHiddenTy g ty ||
isFSharpObjModelRefTy g ty ||
isUnitTy g ty
isUnitTy g ty ||
(isAnonRecdTy g ty && not (isStructAnonRecdTy g ty))
)
// ECMA C# LANGUAGE SPECIFICATION, 27.2

7
src/fsharp/TastPickle.fs Executable file → Normal file
Просмотреть файл

@ -122,6 +122,7 @@ type WriterState =
onlerefs: Table<int * int[]>
osimpletys: Table<int>
oglobals : TcGlobals
mutable isStructThisArgPos : bool
ofile : string
/// Indicates if we are using in-memory format, where we store XML docs as well
oInMem : bool
@ -778,7 +779,8 @@ let pickleObjWithDanglingCcus inMem file g scope p x =
osimpletys=Table<_>.Create "osimpletys"
oglobals=g
ofile=file
oInMem=inMem }
oInMem=inMem
isStructThisArgPos = false}
p x st1
let sizes =
st1.oentities.Size,
@ -802,7 +804,8 @@ let pickleObjWithDanglingCcus inMem file g scope p x =
osimpletys=Table<_>.Create "osimpletys (fake)"
oglobals=g
ofile=file
oInMem=inMem }
oInMem=inMem
isStructThisArgPos = false }
p_array p_encoded_ccuref ccuNameTab.AsArray st2
// Add a 4th integer indicated by a negative 1st integer
let z1 = if nanoninfos > 0 then -ntycons-1 else ntycons

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

@ -671,22 +671,22 @@ let ShrinkContext env oldRange newRange =
| ContextInfo.SequenceExpression _ ->
env
| ContextInfo.CollectionElement (b,m) ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.CollectionElement(b,newRange) }
| ContextInfo.FollowingPatternMatchClause m ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.FollowingPatternMatchClause newRange }
| ContextInfo.PatternMatchGuard m ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.PatternMatchGuard newRange }
| ContextInfo.IfExpression m ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.IfExpression newRange }
| ContextInfo.OmittedElseBranch m ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.OmittedElseBranch newRange }
| ContextInfo.ElseBranchResult m ->
if m <> oldRange then env else
if not (Range.equals m oldRange) then env else
{ env with eContextInfo = ContextInfo.ElseBranchResult newRange }
/// Optimized unification routine that avoids creating new inference
@ -1870,7 +1870,7 @@ let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv =
member this.NotifyExprHasType(_, _, _, _, _, _) = assert false // no expr typings in MakeSimpleVals
member this.NotifyFormatSpecifierLocation(_, _) = ()
member this.NotifyOpenDeclaration(_) = ()
member this.CurrentSource = None
member this.CurrentSourceText = None
member this.FormatStringCheckContext = None }
use _h = WithNewTypecheckResultsSink(sink, cenv.tcSink)
@ -6925,7 +6925,7 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr
let requiresCtor = (GetCtorShapeCounter env = 1) // Get special expression forms for constructors
let haveCtor = Option.isSome inherits
let optOrigExprInfo, tpenv =
let optOrigExpr, tpenv =
match optOrigExpr with
| None -> None, tpenv
| Some (origExpr, _) ->
@ -6933,10 +6933,9 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr
| Some (_, _, mInherits, _, _) -> error(Error(FSComp.SR.tcInvalidRecordConstruction(), mInherits))
| None ->
let olde, tpenv = TcExpr cenv overallTy env tpenv origExpr
let oldvaddr, oldvaddre = mkCompGenLocal mWholeExpr "inputRecord" (if isStructTy cenv.g overallTy then mkByrefTy cenv.g overallTy else overallTy)
Some (olde, oldvaddr, oldvaddre), tpenv
Some (olde), tpenv
let hasOrigExpr = optOrigExprInfo.IsSome
let hasOrigExpr = optOrigExpr.IsSome
let fldsList =
let flds =
@ -6963,6 +6962,13 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr
| Some v -> yield n, v
| None -> () ]
let optOrigExprInfo =
match optOrigExpr with
| None -> None
| Some(olde) ->
let oldvaddr, oldvaddre = mkCompGenLocal mWholeExpr "inputRecord" (if isStructTy cenv.g overallTy then mkByrefTy cenv.g overallTy else overallTy)
Some(olde, oldvaddr, oldvaddre)
if hasOrigExpr && not (isRecdTy cenv.g overallTy) then
errorR(Error(FSComp.SR.tcExpressionFormRequiresRecordTypes(), mWholeExpr))
@ -11626,7 +11632,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv
// Suppress hover tip for "get" and "set" at property definitions, where toolId <> bindingId
match toolIdOpt with
| Some tid when not tid.idRange.IsSynthetic && tid.idRange <> bindingId.idRange ->
| Some tid when not tid.idRange.IsSynthetic && not (Range.equals tid.idRange bindingId.idRange) ->
let item = Item.Value (mkLocalValRef vspec)
CallNameResolutionSink cenv.tcSink (tid.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.RelatedText, env.DisplayEnv, env.eAccessRights)
| _ -> ()

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

@ -6,7 +6,7 @@ module internal FSharp.Compiler.UnicodeLexing
// Functions for Unicode char-based lexing (new code).
//
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.AbstractIL.Internal.Library
open Internal.Utilities
open System.IO
@ -19,6 +19,9 @@ let StringAsLexbuf (s:string) : Lexbuf =
let FunctionAsLexbuf (bufferFiller: char[] * int * int -> int) : Lexbuf =
LexBuffer<_>.FromFunction bufferFiller
let SourceTextAsLexbuf sourceText =
LexBuffer<char>.FromSourceText(sourceText)
// The choice of 60 retries times 50 ms is not arbitrary. The NTFS FILETIME structure
// uses 2 second resolution for LastWriteTime. We retry long enough to surpass this threshold

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

@ -2,6 +2,7 @@
module internal FSharp.Compiler.UnicodeLexing
open FSharp.Compiler.Text
open Microsoft.FSharp.Text
open Internal.Utilities.Text.Lexing
@ -9,3 +10,4 @@ type Lexbuf = LexBuffer<char>
val internal StringAsLexbuf : string -> Lexbuf
val public FunctionAsLexbuf : (char [] * int * int -> int) -> Lexbuf
val public UnicodeFileAsLexbuf :string * int option * (*retryLocked*) bool -> Lexbuf
val public SourceTextAsLexbuf : ISourceText -> Lexbuf

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

@ -142,11 +142,12 @@ type InProcErrorLoggerProvider() =
member this.HandleTooManyErrors(text) = warnings.Add(Diagnostic.Short(false, text))
member this.HandleIssue(tcConfigBuilder, err, isError) =
let errs =
member this.HandleIssue(tcConfigBuilder, err, isError) =
// 'true' is passed for "suggestNames", since we want to suggest names with fsc.exe runs and this doesn't affect IDE perf
let errs =
CollectDiagnostic
(tcConfigBuilder.implicitIncludeDir, tcConfigBuilder.showFullPaths,
tcConfigBuilder.flatErrors, tcConfigBuilder.errorStyle, isError, err)
(tcConfigBuilder.implicitIncludeDir, tcConfigBuilder.showFullPaths,
tcConfigBuilder.flatErrors, tcConfigBuilder.errorStyle, isError, err, true)
let container = if isError then errors else warnings
container.AddRange(errs) }
:> ErrorLogger }
@ -227,10 +228,10 @@ let AdjustForScriptCompile(ctok, tcConfigB: TcConfigBuilder, commandLineSourceFi
// Record the references from the analysis of the script. The full resolutions are recorded as the corresponding #I paths used to resolve them
// are local to the scripts and not added to the tcConfigB (they are added to localized clones of the tcConfigB).
let references =
closure.References
|> List.collect snd
|> List.filter (fun r -> r.originalReference.Range<>range0 && r.originalReference.Range<>rangeStartup)
let references =
closure.References
|> List.collect snd
|> List.filter (fun r -> not (Range.equals r.originalReference.Range range0) && not (Range.equals r.originalReference.Range rangeStartup))
references |> List.iter (fun r -> tcConfigB.AddReferencedAssemblyByPath(r.originalReference.Range, r.resolvedPath))
closure.NoWarns |> List.collect (fun (n, ms) -> ms|>List.map(fun m->m, n)) |> List.iter (fun (x,m) -> tcConfigB.TurnWarningOff(x, m))

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

@ -6,7 +6,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-4.5.0.0" newVersion="4.5.0.0"/>
<bindingRedirect oldVersion="2.0.0.0-4.6.0.0" newVersion="4.6.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

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

@ -4,17 +4,16 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
<TargetExt>.exe</TargetExt>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<UseAssetTargetFallback>true</UseAssetTargetFallback>
<NGenBinary>true</NGenBinary>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

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

@ -5,7 +5,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-4.5.0.0" newVersion="4.5.0.0"/>
<bindingRedirect oldVersion="2.0.0.0-4.6.0.0" newVersion="4.6.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

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

@ -48,6 +48,7 @@ open FSharp.Compiler.TypeChecker
open FSharp.Compiler.Tast
open FSharp.Compiler.Tastops
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Text
open FSharp.Compiler.SourceCodeServices
open FSharp.Compiler.ReferenceResolver
@ -2321,7 +2322,7 @@ type internal FsiInteractionProcessor
let tcConfig = TcConfig.Create(tcConfigB,validate=false)
let fsiInteractiveChecker = FsiInteractiveChecker(legacyReferenceResolver, checker, tcConfig, istate.tcGlobals, istate.tcImports, istate.tcState)
fsiInteractiveChecker.ParseAndCheckInteraction(ctok, text)
fsiInteractiveChecker.ParseAndCheckInteraction(ctok, SourceText.ofString text)
//----------------------------------------------------------------------------
@ -2560,7 +2561,8 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
| Choice2Of2 None -> Choice2Of2 (System.Exception "Operation could not be completed due to earlier error")
| Choice2Of2 (Some userExn) -> Choice2Of2 userExn
userRes, ErrorHelpers.CreateErrorInfos (errorOptions, true, scriptFile, errs)
// 'true' is passed for "suggestNames" because we want the FSI session to suggest names for misspellings and it won't affect IDE perf much
userRes, ErrorHelpers.CreateErrorInfos (errorOptions, true, scriptFile, errs, true)
let dummyScriptFileName = "input.fsx"

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

@ -4,18 +4,17 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp2.1</TargetFrameworks>
<TargetExt>.exe</TargetExt>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<Win32Resource>fsi.res</Win32Resource>
<UseAssetTargetFallback>true</UseAssetTargetFallback>
<NGenBinary>true</NGenBinary>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>$(DefineConstants);FSI_SHADOW_COPY_REFERENCES;FSI_SERVER</DefineConstants>
</PropertyGroup>
@ -31,14 +30,11 @@
<ProjectReference Include="..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
<ProjectReference Include="..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
<!-- only used when '$(TargetFramework)' == 'netstandard2.0' -->
<ProjectReference Include="..\FSharp.Build\FSharp.Build.fsproj" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<!-- only used when '$(TargetFramework)' == 'net46' -->
<ProjectReference Include="..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" Condition="'$(TargetFramework)' == 'net46'" />
<!-- only used when '$(TargetFramework)' == 'net472' -->
<ProjectReference Include="..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" Condition="'$(TargetFramework)' == 'net472'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="PresentationCore" />

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../FSIstrings.resx">
<body>
@ -264,7 +264,7 @@
</trans-unit>
<trans-unit id="shadowCopyReferences">
<source>Prevents references from being locked by the F# Interactive process</source>
<target state="translated">Znemožňuje zamknutí referencí procesem nástroje F# Interactive.</target>
<target state="translated">Znemožňuje zamknutí referencí interaktivním procesem jazyka F#.</target>
<note />
</trans-unit>
</body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../FSIstrings.resx">
<body>
@ -134,7 +134,7 @@
</trans-unit>
<trans-unit id="fsiExceptionDuringPrettyPrinting">
<source>\n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n</source>
<target state="translated">\n\nAusnahme beim Schöndruck.\nMelden Sie dies, damit das Problem behoben werden kann.\nAblaufverfolgung: {0}\n</target>
<target state="translated">\n\nAusnahme bei der automatischen Strukturierung und Einrückung.\nMelden Sie dies, damit das Problem behoben werden kann.\nAblaufverfolgung: {0}\n</target>
<note />
</trans-unit>
<trans-unit id="fsiIntroTextHeader1directives">
@ -264,7 +264,7 @@
</trans-unit>
<trans-unit id="shadowCopyReferences">
<source>Prevents references from being locked by the F# Interactive process</source>
<target state="translated">Verhindert, dass Verweise vom F# Interactive-Prozess gesperrt werden</target>
<target state="translated">Verhindert, dass Verweise vom interaktiven Prozess F# gesperrt werden</target>
<note />
</trans-unit>
</body>

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../FSIstrings.resx">
<body>
@ -99,7 +99,7 @@
</trans-unit>
<trans-unit id="fsiConsoleProblem">
<source>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'.</source>
<target state="translated">Se produjo un problema al iniciar el proceso de F# interactivo. Esto puede deberse a un problema conocido de compatibilidad de la consola de procesos en segundo plano con aplicaciones habilitadas para Unicode en algunos sistemas Windows. Pruebe lo siguiente: seleccione Herramientas-&gt;Opciones-&gt;F# interactivo para Visual Studio y escriba “--fsi-server-no-unicode”.</target>
<target state="translated">Se produjo un problema al iniciar el proceso de F# interactivo. Esto puede deberse a un problema conocido de compatibilidad de la consola de procesos en segundo plano con aplicaciones habilitadas para Unicode en algunos sistemas Windows. Pruebe lo siguiente: seleccione Herramientas-&gt;Opciones-&gt;F# interactivo para Visual Studio y escriba '--fsi-server-no-unicode'.</target>
<note />
</trans-unit>
<trans-unit id="fsiInvalidAssembly">
@ -139,7 +139,7 @@
</trans-unit>
<trans-unit id="fsiIntroTextHeader1directives">
<source> F# Interactive directives:</source>
<target state="translated"> Directivas de F# interactivo:</target>
<target state="translated"> Directivas de F#:</target>
<note />
</trans-unit>
<trans-unit id="fsiIntroTextHashrInfo">
@ -214,7 +214,7 @@
</trans-unit>
<trans-unit id="fsiDidAHashrWithLockWarning">
<source>--&gt; Referenced '{0}' (file may be locked by F# Interactive process)</source>
<target state="translated">--&gt; “{0}” al que se hace referencia (el archivo puede estar bloqueado por un proceso de F# interactivo)</target>
<target state="translated">--&gt; '{0}' al que se hace referencia (el archivo puede estar bloqueado por un proceso de F# interactivo)</target>
<note />
</trans-unit>
<trans-unit id="fsiDidAHashrWithStaleWarning">
@ -259,7 +259,7 @@
</trans-unit>
<trans-unit id="fsiProductNameCommunity">
<source>F# Interactive for F# {0}</source>
<target state="translated">F# interactivo para F# {0}</target>
<target state="translated">F# Interactive para F# {0}</target>
<note />
</trans-unit>
<trans-unit id="shadowCopyReferences">

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../FSIstrings.resx">
<body>
@ -134,7 +134,7 @@
</trans-unit>
<trans-unit id="fsiExceptionDuringPrettyPrinting">
<source>\n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n</source>
<target state="translated">\n\nException déclenchée durant l'impression automatique.\nSignalez ce problème afin qu'il soit corrigé.\nTrace : {0}\n</target>
<target state="translated">\n\nException déclenchée pendant le listing en mode Pretty. \nSignalez ce problème afin qu'il soit corrigé.\nTrace : {0}\n</target>
<note />
</trans-unit>
<trans-unit id="fsiIntroTextHeader1directives">

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