Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit08b02f9

Browse files
dsymeKevinRansom
authored andcommitted
fix 2952 - freeze on sending input to F# Interactive (#2996)
* fix 2952 - freeze on sending input to F# Interactive* safeguards
1 parent8ae82c0 commit08b02f9

File tree

3 files changed

+188
-257
lines changed

3 files changed

+188
-257
lines changed

‎vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ open Util
2323
openSystem.ComponentModel
2424
openMicrosoft.VisualStudio.FSharp.Interactive.Session
2525

26-
moduleSP= Microsoft.VisualStudio.FSharp.Interactive.Session.SessionsProperties
27-
28-
2926
moduleinternalContentType=
3027
[<Export>]
3128
[<Name(Guids.fsiContentTypeName)>]
@@ -43,22 +40,22 @@ type FsiPropertyPage() =
4340
[<SRProperties.Category(SRProperties.FSharpInteractiveMisc)>]
4441
[<SRProperties.DisplayName(SRProperties.FSharpInteractive64Bit)>]
4542
[<SRProperties.Description(SRProperties.FSharpInteractive64BitDescr)>]
46-
memberthis.FsiPreferAnyCPUVersionwith get()=SP.useAnyCpuVersionandset(x:bool)=SP.useAnyCpuVersion<- x
43+
memberthis.FsiPreferAnyCPUVersionwith get()=SessionsProperties.useAnyCpuVersionandset(x:bool)=SessionsProperties.useAnyCpuVersion<- x
4744

4845
[<SRProperties.Category(SRProperties.FSharpInteractiveMisc)>]
4946
[<SRProperties.DisplayName(SRProperties.FSharpInteractiveOptions)>]
5047
[<SRProperties.Description(SRProperties.FSharpInteractiveOptionsDescr)>]
51-
memberthis.FsiCommandLineArgswith get()=SP.fsiArgsandset(x:string)=SP.fsiArgs<- x
48+
memberthis.FsiCommandLineArgswith get()=SessionsProperties.fsiArgsandset(x:string)=SessionsProperties.fsiArgs<- x
5249

5350
[<SRProperties.Category(SRProperties.FSharpInteractiveMisc)>]
5451
[<SRProperties.DisplayName(SRProperties.FSharpInteractiveShadowCopy)>]
5552
[<SRProperties.Description(SRProperties.FSharpInteractiveShadowCopyDescr)>]
56-
memberthis.FsiShadowCopywith get()=SP.fsiShadowCopyandset(x:bool)=SP.fsiShadowCopy<- x
53+
memberthis.FsiShadowCopywith get()=SessionsProperties.fsiShadowCopyandset(x:bool)=SessionsProperties.fsiShadowCopy<- x
5754

5855
[<SRProperties.Category(SRProperties.FSharpInteractiveDebugging)>]
5956
[<SRProperties.DisplayName(SRProperties.FSharpInteractiveDebugMode)>]
6057
[<SRProperties.Description(SRProperties.FSharpInteractiveDebugModeDescr)>]
61-
memberthis.FsiDebugModewith get()=SP.fsiDebugModeandset(x:bool)=SP.fsiDebugMode<- x
58+
memberthis.FsiDebugModewith get()=SessionsProperties.fsiDebugModeandset(x:bool)=SessionsProperties.fsiDebugMode<- x
6259

6360
// CompletionSet
6461
typeinternalFsiCompletionSet(imageList,source:Source)=
@@ -109,7 +106,7 @@ type internal FsiScanner(buffer:IVsTextLines) =
109106
overridethis.ScanTokenAndProvideInfoAboutIt(tokenInfo:TokenInfo,state:byref<int>)=false
110107
// Implementing a scanner with TokenTriggers could start intellisense calls, e.g. on DOT.
111108

112-
typeinternalFsiAuthoringScope(sessions:Microsoft.VisualStudio.FSharp.Interactive.Session.Sessions option,readOnlySpanGetter:unit->TextSpan)=
109+
typeinternalFsiAuthoringScope(sessions:FsiSessions option,readOnlySpanGetter:unit->TextSpan)=
113110
inherit AuthoringScope()
114111
overridethis.GetDataTipText(line:int,col:int,span:byref<TextSpan>)=
115112
span<-new TextSpan()
@@ -131,7 +128,7 @@ type internal FsiAuthoringScope(sessions:Microsoft.VisualStudio.FSharp.Interacti
131128
// Multiline input is available to a limited degree (and could be improved).
132129
letspan= readOnlySpanGetter()
133130
letstr= lines.GetLineText(span.iEndLine,span.iEndIndex,line,col)|> throwOnFailure1
134-
letdeclInfos=getDeclarationInfos(sessions:Sessions)(str:string)
131+
letdeclInfos= sessions.GetDeclarationInfos(str:string)
135132
new FsiDeclarations(declInfos):> Declarations
136133
else
137134
#endif
@@ -201,7 +198,7 @@ type internal FsiLanguageService() =
201198
doassert("35A5E6B8-4012-41fc-A652-2CDC56D74E9F"= Guids.guidFsiLanguageService)
202199
let mutablepreferences=null: LanguagePreferences
203200
let mutablescanner=null: IScanner
204-
let mutablesessions= None: Session.Sessions option
201+
let mutablesessions= None: Session.FsiSessions option
205202
let mutablereadOnlySpanGetter=(fun()->new TextSpan())
206203

207204
letreadOnlySpan()= readOnlySpanGetter()// do not eta-contract, readOnlySpanGetter is mutable.

‎vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ type internal FsiToolWindow() as this =
197197

198198
// F# Interactive sessions
199199
lethistory= HistoryBuffer()
200-
letsessions= Session.createSessions()
200+
letsessions= Session.FsiSessions()
201201
do fsiLangService.Sessions<- sessions
202202
letwriteTextAndScroll(str:string)=
203203
if str<>null&& textLines<>nullthen
@@ -295,13 +295,13 @@ type internal FsiToolWindow() as this =
295295

296296
letexecuteTextNoHistory(text:string)=
297297
textStream.DirectWriteLine()
298-
sessions.Input(text)
298+
sessions.SendInput(text)
299299
setCursorAtEndOfBuffer()
300300

301301
letexecuteText(text:string)=
302302
textStream.DirectWriteLine()
303303
history.Add(text)
304-
sessions.Input(text)
304+
sessions.SendInput(text)
305305
setCursorAtEndOfBuffer()
306306

307307
letexecuteUserInput()=
@@ -310,7 +310,7 @@ type internal FsiToolWindow() as this =
310310
textStream.ExtendReadOnlyMarker()
311311
textStream.DirectWriteLine()
312312
history.Add(text)
313-
sessions.Input(text)
313+
sessions.SendInput(text)
314314
setCursorAtEndOfBuffer()
315315

316316
// NOTE: SupportWhen* functions are guard conditions for command handlers

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp