Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@microsoft.com>2019-08-22 22:12:04 +0300
committerMatt Ward <matt.ward@microsoft.com>2019-08-22 22:14:01 +0300
commit98eddbfcbc58b0b108319526a89afd4c6852d4b4 (patch)
tree4c36f45f765e800495bf797af80096eb28f0dbdd /main/external/fsharpbinding
parentc31db83fe4a5d65e1f04a0d4fab1cb86fe9934fb (diff)
[F#] Update to FSharp.CompilerService 31.0
Diffstat (limited to 'main/external/fsharpbinding')
-rw-r--r--main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TestHelpers.fs6
-rw-r--r--main/external/fsharpbinding/MonoDevelop.FSharpBinding/ScriptDebugging.fs5
-rw-r--r--main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/LanguageService.fs13
-rw-r--r--main/external/fsharpbinding/paket.dependencies2
-rw-r--r--main/external/fsharpbinding/paket.lock4
5 files changed, 17 insertions, 13 deletions
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TestHelpers.fs b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TestHelpers.fs
index e0600fdb50..9aeadb911a 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TestHelpers.fs
+++ b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/TestHelpers.fs
@@ -1,6 +1,7 @@
namespace MonoDevelopTests
open System
open FSharp.Compiler.SourceCodeServices
+open FSharp.Compiler.Text
open MonoDevelop.FSharp
open MonoDevelop.Ide.Editor
open MonoDevelop.Ide.TypeSystem
@@ -36,8 +37,9 @@ module TestHelpers =
async {
try
let checker = FSharpChecker.Create()
- let! projOptions, _errors = checker.GetProjectOptionsFromScript(filename, source)
- let! parseResults, checkAnswer = checker.ParseAndCheckFileInProject(filename, 0, source , projOptions)
+ let sourceText = SourceText.ofString source
+ let! projOptions, _errors = checker.GetProjectOptionsFromScript(filename, sourceText)
+ let! parseResults, checkAnswer = checker.ParseAndCheckFileInProject(filename, 0, sourceText , projOptions)
// Construct new typed parse result if the task succeeded
let results =
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/ScriptDebugging.fs b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/ScriptDebugging.fs
index 2ce7d806e1..fb1c113b10 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/ScriptDebugging.fs
+++ b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/ScriptDebugging.fs
@@ -4,6 +4,7 @@ open System.IO
open System.Threading
open System.Threading.Tasks
open FSharp.Compiler.SourceCodeServices
+open FSharp.Compiler.Text
open MonoDevelop.Components.Commands
open MonoDevelop.Core
open MonoDevelop.Core.Assemblies
@@ -118,7 +119,7 @@ type FSharpDebugScriptTextEditorExtension() =
inherit TextEditorExtension()
member x.StartDebugging consoleKind =
- let buildTarget = ScriptBuildTarget (x.Editor.FileName, consoleKind, x.Editor.Text)
+ let buildTarget = ScriptBuildTarget (x.Editor.FileName, consoleKind, SourceText.ofString x.Editor.Text)
let debug = IdeApp.ProjectOperations.Debug buildTarget
debug.Task
@@ -148,7 +149,7 @@ type DebugScriptNodeHandler() =
member x.StartDebugging consoleKind =
let file = x.CurrentNode.DataItem :?> ProjectFile
let doc = IdeApp.Workbench.OpenDocument(file.FilePath, null, true) |> Async.AwaitTask |> Async.RunSynchronously
- let buildTarget = ScriptBuildTarget (file.FilePath, consoleKind, doc.Editor.Text)
+ let buildTarget = ScriptBuildTarget (file.FilePath, consoleKind, SourceText.ofString doc.Editor.Text)
let debug = IdeApp.ProjectOperations.Debug buildTarget
debug.Task
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/LanguageService.fs b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/LanguageService.fs
index 474bcb0645..4d5d8d3240 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/LanguageService.fs
+++ b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/Services/LanguageService.fs
@@ -5,6 +5,7 @@ open System.IO
open System.Diagnostics
open FSharp.Compiler
open FSharp.Compiler.SourceCodeServices
+open FSharp.Compiler.Text
open ExtCore.Control
open ExtCore.Control.Collections
open MonoDevelop.Core
@@ -325,7 +326,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
let fileName = fixFileName(fileName)
LoggingService.LogDebug ("LanguageService: GetScriptCheckerOptions: Creating for stand-alone file or script: {0}", fileName)
let opts, _errors =
- Async.RunSynchronously (checker.GetProjectOptionsFromScript(fileName, source, fakeDateTimeRepresentingTimeLoaded projFilename),
+ Async.RunSynchronously (checker.GetProjectOptionsFromScript(fileName, SourceText.ofString source, fakeDateTimeRepresentingTimeLoaded projFilename),
timeout = ServiceSettings.maximumTimeout)
// The InteractiveChecker resolution sometimes doesn't include FSharp.Core and other essential assemblies, so we need to include them by hand
@@ -437,7 +438,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
let res =
match stale with
| AllowStaleResults.MatchingFileName -> checker.TryGetRecentCheckResultsForFile(fixFileName fileName, options)
- | AllowStaleResults.MatchingSource -> checker.TryGetRecentCheckResultsForFile(fixFileName fileName, options, source=src)
+ | AllowStaleResults.MatchingSource -> checker.TryGetRecentCheckResultsForFile(fixFileName fileName, options, sourceText = SourceText.ofString src)
match res with
| Some (untyped,typed,_) when typed.HasFullTypeCheckInfo -> Some (ParseAndCheckResults(Some typed, Some untyped))
@@ -471,7 +472,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
member x.ParseAndCheckFileInProject(projectFilename, fileName, version:int, src:string, obsoleteCheck) =
let fileName = if Path.GetExtension fileName = ".sketchfs" then Path.ChangeExtension (fileName, ".fsx") else fileName
let opts = x.GetCheckerOptions(fileName, projectFilename, src)
- x.ParseAndCheckFile(fileName, src, version, opts, obsoleteCheck)
+ x.ParseAndCheckFile(fileName, SourceText.ofString src, version, opts, obsoleteCheck)
/// Parses and checks the given file in the given project under the given configuration.
///Asynchronously returns the results of checking the file.
@@ -492,7 +493,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
match timeout with
| Some timeout ->
LoggingService.logDebug "LanguageService: GetTypedParseResultWithTimeout: No stale results - typechecking with timeout"
- let! computation = Async.StartChild(x.ParseAndCheckFile(fileName, src, version, options, obs), timeout)
+ let! computation = Async.StartChild(x.ParseAndCheckFile(fileName, SourceText.ofString src, version, options, obs), timeout)
try
let! result = computation
return Some(result)
@@ -502,7 +503,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
return None
| None ->
LoggingService.logDebug "LanguageService: GetTypedParseResultWithTimeout: No stale results - typechecking without timeout"
- let! result = x.ParseAndCheckFile(fileName, src, version, options, obs)
+ let! result = x.ParseAndCheckFile(fileName, SourceText.ofString src, version, options, obs)
return Some(result)
| None -> return None }
@@ -550,7 +551,7 @@ type LanguageService(dirtyNotify, _extraProjectInfo) as x =
match options with
| Some opts ->
let parseOptions, _errors = x.GetParsingOptionsFromProjectOptions opts
- checker.MatchBraces(filename, source, parseOptions)
+ checker.MatchBraces(filename, SourceText.ofString source, parseOptions)
| None -> async { return [||] }
/// Get all symbols derived from the specified symbol in the current project and optionally all dependent projects
diff --git a/main/external/fsharpbinding/paket.dependencies b/main/external/fsharpbinding/paket.dependencies
index d44d4c313f..e9817ad8e6 100644
--- a/main/external/fsharpbinding/paket.dependencies
+++ b/main/external/fsharpbinding/paket.dependencies
@@ -3,7 +3,7 @@ framework: net472
source https://nuget.org/api/v2/
nuget ExtCore framework: >= net40
-nuget FSharp.Compiler.Service 28.0.0
+nuget FSharp.Compiler.Service 31.0.0
nuget FSharp.Core
nuget System.ValueTuple
nuget Fantomas 3.0.0-beta-001
diff --git a/main/external/fsharpbinding/paket.lock b/main/external/fsharpbinding/paket.lock
index 1250fbd6f3..407934521b 100644
--- a/main/external/fsharpbinding/paket.lock
+++ b/main/external/fsharpbinding/paket.lock
@@ -6,12 +6,12 @@ NUGET
Fantomas (3.0.0-beta-001)
FSharp.Compiler.Service (>= 28.0)
FSharp.Compiler.CodeDom (0.9.2)
- FSharp.Compiler.Service (28.0)
+ FSharp.Compiler.Service (31.0)
FSharp.Core (>= 4.6.2)
System.Collections.Immutable (>= 1.5)
System.Reflection.Metadata (>= 1.6)
System.ValueTuple (>= 4.4)
- FSharp.Core (4.6.2)
+ FSharp.Core (4.7)
Mono.Cecil (0.10.0-beta6)
Newtonsoft.Json (12.0.2)
StrongNamer (0.0.8)