Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
84f7488f
F
fsharp
项目概览
dotNET Platform
/
fsharp
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
84f7488f
编写于
2月 08, 2019
作者:
K
Kevin Ransom (msft)
提交者:
GitHub
2月 08, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
We don't ever set the value FCS_RETAIN_BACKGROUND_PARSE_RESULTS (#6212)
上级
1bbb60a4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
35 deletion
+1
-35
src/fsharp/service/IncrementalBuild.fs
src/fsharp/service/IncrementalBuild.fs
+0
-18
tests/service/ProjectAnalysisTests.fs
tests/service/ProjectAnalysisTests.fs
+0
-12
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs
...LegacyLanguageService/Tests.LanguageService.Completion.fs
+1
-5
未找到文件。
src/fsharp/service/IncrementalBuild.fs
浏览文件 @
84f7488f
...
...
@@ -1534,12 +1534,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput
let
stampedFileNamesNode
=
Vector
.
Stamp
"SourceFileTimeStamps"
StampFileNameTask
fileNamesNode
let
stampedReferencedAssembliesNode
=
Vector
.
Stamp
"StampReferencedAssembly"
StampReferencedAssemblyTask
referencedAssembliesNode
let
initialTcAccNode
=
Vector
.
Demultiplex
"CombineImportedAssemblies"
CombineImportedAssembliesTask
stampedReferencedAssembliesNode
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
let
parseTreesNode
=
Vector
.
Map
"ParseTrees"
ParseTask
stampedFileNamesNode
let
tcStatesNode
=
Vector
.
ScanLeft
"TypeCheckingStates"
TypeCheckTask
initialTcAccNode
stampedFileNamesNode
#
else
let
tcStatesNode
=
Vector
.
ScanLeft
"TypeCheckingStates"
(
fun
ctok
tcAcc
n
->
TypeCheckTask
ctok
tcAcc
(
ParseTask
ctok
n
))
initialTcAccNode
stampedFileNamesNode
#
endif
let
finalizedTypeCheckNode
=
Vector
.
Demultiplex
"FinalizeTypeCheck"
FinalizeTypeCheckTask
tcStatesNode
// Outputs
...
...
@@ -1547,9 +1542,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput
do
buildDescription
.
DeclareVectorOutput
stampedFileNamesNode
do
buildDescription
.
DeclareVectorOutput
stampedReferencedAssembliesNode
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
do
buildDescription
.
DeclareVectorOutput
parseTreesNode
#
endif
do
buildDescription
.
DeclareVectorOutput
tcStatesNode
do
buildDescription
.
DeclareScalarOutput
initialTcAccNode
do
buildDescription
.
DeclareScalarOutput
finalizedTypeCheckNode
...
...
@@ -1712,15 +1704,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput
member
builder
.
GetParseResultsForFile
(
ctok
:
CompilationThreadToken
,
filename
)
=
cancellable
{
let
slotOfFile
=
builder
.
GetSlotOfFileName
filename
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
match
GetVectorResultBySlot
(
parseTreesNode
,
slotOfFile
,
partialBuild
)
with
|
Some
(
results
,
_)
->
return
results
|
None
->
let
!
build
=
IncrementalBuild
.
EvalUpTo
ctok
SavePartialBuild
(
parseTreesNode
,
slotOfFile
)
partialBuild
match
GetVectorResultBySlot
(
parseTreesNode
,
slotOfFile
,
build
)
with
|
Some
(
results
,
_)
->
return
results
|
None
->
return
!
failwith
"Build was not evaluated, expected the results to be ready after 'Eval' (GetParseResultsForFile)."
#
else
let
!
results
=
cancellable
{
match
GetVectorResultBySlot
(
stampedFileNamesNode
,
slotOfFile
,
partialBuild
)
with
...
...
@@ -1734,7 +1717,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput
}
// re-parse on demand instead of retaining
return
ParseTask
ctok
results
#
endif
}
member
__.
SourceFiles
=
sourceFiles
|>
List
.
map
(
fun
(_,
f
,
_)
->
f
)
...
...
tests/service/ProjectAnalysisTests.fs
浏览文件 @
84f7488f
...
...
@@ -5179,11 +5179,7 @@ let ``Test request for parse and check doesn't check whole project`` () =
backgroundCheckCount
.
Value
|>
shouldEqual
0
let
checkResults1
=
checker
.
CheckFileInProject
(
parseResults1
,
ProjectBig
.
fileNames
.[
5
],
0
,
ProjectBig
.
fileSources2
.[
5
],
ProjectBig
.
options
)
|>
Async
.
RunSynchronously
let
pD
,
tD
=
FSharpChecker
.
GlobalForegroundParseCountStatistic
,
FSharpChecker
.
GlobalForegroundTypeCheckCountStatistic
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
backgroundParseCount
.
Value
|>
shouldEqual
10
#
else
backgroundParseCount
.
Value
|>
shouldEqual
5
#
endif
backgroundCheckCount
.
Value
|>
shouldEqual
5
(
pD
-
pC
)
|>
shouldEqual
0
(
tD
-
tC
)
|>
shouldEqual
1
...
...
@@ -5192,11 +5188,7 @@ let ``Test request for parse and check doesn't check whole project`` () =
let
pE
,
tE
=
FSharpChecker
.
GlobalForegroundParseCountStatistic
,
FSharpChecker
.
GlobalForegroundTypeCheckCountStatistic
(
pE
-
pD
)
|>
shouldEqual
0
(
tE
-
tD
)
|>
shouldEqual
1
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
backgroundParseCount
.
Value
|>
shouldEqual
10
// but note, the project does not get reparsed
#
else
(
backgroundParseCount
.
Value
<=
8
)
|>
shouldEqual
true
// but note, the project does not get reparsed
#
endif
(
backgroundCheckCount
.
Value
<=
8
)
|>
shouldEqual
true
// only two extra typechecks of files
// A subsequent ParseAndCheck of identical source code doesn't do any more anything
...
...
@@ -5204,11 +5196,7 @@ let ``Test request for parse and check doesn't check whole project`` () =
let
pF
,
tF
=
FSharpChecker
.
GlobalForegroundParseCountStatistic
,
FSharpChecker
.
GlobalForegroundTypeCheckCountStatistic
(
pF
-
pE
)
|>
shouldEqual
0
// note, no new parse of the file
(
tF
-
tE
)
|>
shouldEqual
0
// note, no new typecheck of the file
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
backgroundParseCount
.
Value
|>
shouldEqual
10
// but note, the project does not get reparsed
#
else
(
backgroundParseCount
.
Value
<=
8
)
|>
shouldEqual
true
// but note, the project does not get reparsed
#
endif
(
backgroundCheckCount
.
Value
<=
8
)
|>
shouldEqual
true
// only two extra typechecks of files
()
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs
浏览文件 @
84f7488f
...
...
@@ -4260,12 +4260,8 @@ let x = query { for bbbb in abbbbc(*D0*) do
ReplaceFileInMemory
file2
[
""
]
SaveFileToDisk
file2
TakeCoffeeBreak
(
this
.
VS
)
#
if
FCS_RETAIN_BACKGROUND_PARSE_RESULTS
gpatcc
.
AssertExactly
(
notAA
[
file2
],
notAA
[
file2
;
file3
])
#
else
gpatcc
.
AssertExactly
(
notAA
[
file2
;
file3
],
notAA
[
file2
;
file3
])
#
endif
/// FEATURE: References added to the project bring corresponding new .NET and F# items into scope.
[<
Test
;
Category
(
"ReproX"
)>]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录