Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
9297efff
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9297efff
编写于
12月 09, 2020
作者:
K
Kevin Ransom (msft)
提交者:
GitHub
12月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
We don't ever set fsi_server_intellisense (#10654)
上级
7cd8292f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
81 deletion
+1
-81
fcs-samples/FsiExe/fsiserver.fs
fcs-samples/FsiExe/fsiserver.fs
+0
-4
src/fsharp/FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs
.../FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs
+0
-4
vsintegration/src/FSharp.VS.FSI/fsiBasis.fs
vsintegration/src/FSharp.VS.FSI/fsiBasis.fs
+0
-3
vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs
vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs
+1
-20
vsintegration/src/FSharp.VS.FSI/sessions.fs
vsintegration/src/FSharp.VS.FSI/sessions.fs
+0
-50
未找到文件。
fcs-samples/FsiExe/fsiserver.fs
浏览文件 @
9297efff
...
...
@@ -33,10 +33,6 @@ open System.Runtime.Remoting.Lifetime
type
internal
FSharpInteractiveServer
()
=
inherit
System
.
MarshalByRefObject
()
abstract
Interrupt
:
unit
->
unit
#
if
FSI_SERVER_INTELLISENSE
abstract
Completions
:
prefix
:
string
->
string
array
abstract
GetDeclarations
:
text
:
string
*
names
:
string
array
->
(
string
*
string
*
string
*
int
)
array
#
endif
default
x
.
Interrupt
()
=
()
[<
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Design"
,
"CA1011:ConsiderPassingBaseTypesAsParameters"
)>]
...
...
src/fsharp/FSharp.Compiler.Server.Shared/FSharpInteractiveServer.fs
浏览文件 @
9297efff
...
...
@@ -27,10 +27,6 @@ open System.Runtime.Remoting.Lifetime
type
internal
FSharpInteractiveServer
()
=
inherit
System
.
MarshalByRefObject
()
abstract
Interrupt
:
unit
->
unit
#
if
FSI_SERVER_INTELLISENSE
abstract
Completions
:
prefix
:
string
->
string
array
abstract
GetDeclarations
:
text
:
string
*
names
:
string
array
->
(
string
*
string
*
string
*
int
)
array
#
endif
default
x
.
Interrupt
()
=
()
[<
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Design"
,
"CA1011:ConsiderPassingBaseTypesAsParameters"
)>]
...
...
vsintegration/src/FSharp.VS.FSI/fsiBasis.fs
浏览文件 @
9297efff
...
...
@@ -37,9 +37,6 @@ module internal AssemblyAttributes =
do
()
module
internal
Guids
=
#
if
FSI_SERVER_INTELLISENSE
let
enable_fsi_intellisense
=
true
#
endif
// FSI Session command set
let
guidInteractiveCommands
=
Microsoft
.
VisualStudio
.
VSConstants
.
VsStd11
...
...
vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs
浏览文件 @
9297efff
...
...
@@ -119,26 +119,7 @@ type internal FsiAuthoringScope(sessions:FsiSessions option,readOnlySpanGetter:u
null
override
this
.
GetDeclarations
(_
snapshot
,
line
:
int
,
col
:
int
,
info
:
TokenInfo
,
reason
:
ParseReason
)
=
match
sessions
with
|
None
->
(
new
FsiDeclarations
()
:>
Declarations
)
|
Some
sessions
->
#
if
FSI_SERVER_INTELLISENSE
if
Guids
.
enable_fsi_intellisense
then
let
lines
=
view
.
GetBuffer
()
|>
throwOnFailure1
//NOTE:
// There is an issue of how much preceeding text to grab for the intellisense.
// Ideally, we want all text from the end of the last executed interaction.
// However, we do not have an interactive "scanner" yet.
//------
// The decision is use the current "input area" as the source context.
// Multiline input is available to a limited degree (and could be improved).
let
span
=
readOnlySpanGetter
()
let
str
=
lines
.
GetLineText
(
span
.
iEndLine
,
span
.
iEndIndex
,
line
,
col
)
|>
throwOnFailure1
let
declInfos
=
sessions
.
GetDeclarationInfos
(
str
:
string
)
new
FsiDeclarations
(
declInfos
)
:>
Declarations
else
#
endif
(
new
FsiDeclarations
()
:>
Declarations
)
(
new
FsiDeclarations
()
:>
Declarations
)
override
this
.
GetMethods
(
line
:
int
,
col
:
int
,
name
:
string
)
=
new
FsiMethods
()
:>
Methods
...
...
vsintegration/src/FSharp.VS.FSI/sessions.fs
浏览文件 @
9297efff
...
...
@@ -300,19 +300,6 @@ type FsiSession() =
/// interrupt timeout in miliseconds
let
interruptTimeoutMS
=
1000
#
if
FSI_SERVER_INTELLISENSE
// timeout in miliseconds.
// This timeout is to catch any issue with remoting becoming unresponsive.
// On it's duration, it is better from user POV to wait a few seconds and see,
// than to abort an intelisense request that would return,
// since an abort request has no useful information at all.
// 2 seconds seems to slow. (which was surprising, maybe
// the tcEnv were still being computed).
let
completionsTimeoutMS
=
3000
#
endif
let
checkLeaseStatus
myService
=
if
false
then
let
myLease
=
RemotingServices
.
GetLifetimeService
(
myService
)
:?>
ILease
...
...
@@ -357,20 +344,6 @@ type FsiSession() =
with
e
->
fsiOutput
.
Trigger
(
VFSIstrings
.
SR
.
killingProcessRaisedException
(
e
.
ToString
()
))
#
if
FSI_SERVER_INTELLISENSE
member
x
.
Completions
(
s
:
string
)
=
checkLeaseStatus
client
match
timeoutApp
"VFSI completions"
completionsTimeoutMS
(
fun
()
->
client
.
Completions
(
s
))
()
with
|
Some
names
->
names
|
None
->
[|
|]
member
x
.
GetDeclarations
(
s
:
string
,
plid
:
string
[]
)
=
checkLeaseStatus
client
match
timeoutApp
"VFSI intelisense"
completionsTimeoutMS
(
fun
()
->
client
.
GetDeclarations
(
s
,
plid
))
()
with
|
Some
results
->
results
|
None
->
[|
|]
#
endif
//-------------------------------------------------------------------------
// sessions
//-------------------------------------------------------------------------
...
...
@@ -432,26 +405,3 @@ type FsiSessions() =
member
x
.
Kill
()
=
kill
()
member
x
.
Restart
()
=
restart
()
member
x
.
Exited
=
fsiExited
.
Publish
#
if
FSI_SERVER_INTELLISENSE
member
x
.
Completions
(
s
)
=
match
sessionR
with
|
None
->
[|
|]
|
Some
session
->
session
.
Completions
(
s
)
member
x
.
GetDeclarations
(
s
,
plid
)
=
match
sessionR
with
|
None
->
[|
|]
|
Some
session
->
session
.
GetDeclarations
(
s
,
plid
)
member
x
.
GetDeclarationInfos
(
str
:
string
)
=
// RPC to the session to get the completions based on the latest state.
let
plid
=
Microsoft
.
VisualStudio
.
FSharp
.
Interactive
.
QuickParse
.
GetPartialLongName
(
str
,
str
.
Length
-
1
)
// Subtract one to convert to zero-relative
let
project
=
function
(
name
,
None
)
->
[
name
]
|
(
name
,
Some
residue
)
->
[
name
;
residue
]
let
plid
=
plid
|>
List
.
collect
project
|>
List
.
toArray
// diagnostics.Log(sprintf "RPC GetDeclarations with str =[[%s]]" str)
// diagnostics.Log(sprintf "RPC GetDeclarations with plid=[[%s]]" (String.concat "." plid))
let
declInfos
=
x
.
GetDeclarations
(
str
,
plid
)
declInfos
#
endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录