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

Commit2f9e8db

Browse files
committed
P2p references (#3777)
* P2p references* Fix test* test fix* go faster stripes* new project works better* Re-add debug assert for sourcefiles
1 parentc9b975e commit2f9e8db

File tree

13 files changed

+333
-244
lines changed

13 files changed

+333
-244
lines changed

‎src/fsharp/vs/service.fs‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ type FSharpParsingOptions =
13961396
}
13971397

13981398
static memberFromTcConfigBuidler(tcConfigB:TcConfigBuilder,sourceFiles)=
1399-
{
1399+
{
14001400
SourceFiles= sourceFiles
14011401
ConditionalCompilationDefines= tcConfigB.conditionalCompilationDefines
14021402
ErrorSeverityOptions= tcConfigB.errorSeverityOptions
@@ -1724,7 +1724,7 @@ type FSharpProjectOptions =
17241724
memberx.ProjectOptions= x.OtherOptions
17251725
/// Whether the two parse options refer to the same project.
17261726
static memberUseSameProjectFileName(options1,options2)=
1727-
options1.ProjectFileName= options2.ProjectFileName
1727+
options1.ProjectFileName= options2.ProjectFileName
17281728

17291729
/// Compare two options sets with respect to the parts of the options that are important to building.
17301730
static memberAreSameForChecking(options1,options2)=
@@ -1737,7 +1737,9 @@ type FSharpProjectOptions =
17371737
options1.UnresolvedReferences= options2.UnresolvedReferences&&
17381738
options1.OriginalLoadReferences= options2.OriginalLoadReferences&&
17391739
options1.ReferencedProjects.Length= options2.ReferencedProjects.Length&&
1740-
Array.forall2(fun(n1,a)(n2,b)-> n1= n2&& FSharpProjectOptions.AreSameForChecking(a,b)) options1.ReferencedProjects options2.ReferencedProjects&&
1740+
Array.forall2(fun(n1,a)(n2,b)->
1741+
n1= n2&&
1742+
FSharpProjectOptions.AreSameForChecking(a,b)) options1.ReferencedProjects options2.ReferencedProjects&&
17411743
options1.LoadTime= options2.LoadTime
17421744

17431745
/// Compute the project directory.
@@ -2043,11 +2045,11 @@ module Helpers =
20432045

20442046
// Look for DLLs in the location of the service DLL first.
20452047
letdefaultFSharpBinariesDir= FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(Some(typeof<FSharpCheckFileAnswer>.Assembly.Location)).Value
2046-
2048+
20472049
/// Determine whether two (fileName,options) keys are identical w.r.t. affect on checking
2048-
letAreSameForChecking2((fileName1:string,options1:FSharpProjectOptions),(fileName2,o2))=
2050+
letAreSameForChecking2((fileName1:string,options1:FSharpProjectOptions),(fileName2,options2))=
20492051
(fileName1= fileName2)
2050-
&& FSharpProjectOptions.AreSameForChecking(options1,o2)
2052+
&& FSharpProjectOptions.AreSameForChecking(options1,options2)
20512053

20522054
/// Determine whether two (fileName,options) keys should be identical w.r.t. resource usage
20532055
letAreSubsumable2((fileName1:string,o1:FSharpProjectOptions),(fileName2:string,o2:FSharpProjectOptions))=
@@ -2711,7 +2713,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC
27112713
memberbc.InvalidateConfiguration(options:FSharpProjectOptions,startBackgroundCompileIfAlreadySeen,userOpName)=
27122714
letstartBackgroundCompileIfAlreadySeen= defaultArg startBackgroundCompileIfAlreadySeen implicitlyStartBackgroundWork
27132715
// This operation can't currently be cancelled nor awaited
2714-
reactor.EnqueueOp(userOpName,"InvalidateConfiguration", options.ProjectFileName,fun ctok->
2716+
reactor.EnqueueOp(userOpName,"InvalidateConfiguration: Stamp("+(options.Stamp|> Option.defaultValue0L).ToString()+")", options.ProjectFileName,fun ctok->
27152717
// If there was a similar entry then re-establish an empty builder . This is a somewhat arbitrary choice - it
27162718
// will have the effect of releasing memory associated with the previous builder, but costs some time.
27172719
if incrementalBuildersCache.ContainsSimilarKey(ctok, options)then

‎vsintegration/src/FSharp.Editor/Classification/ColorizationService.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type internal FSharpColorizationService
4040
asyncMaybe{
4141
do Trace.TraceInformation("{0:n3} (start) SemanticColorization", DateTime.Now.TimeOfDay.TotalSeconds)
4242
do! Async.Sleep DefaultTuning.SemanticColorizationInitialDelay|> liftAsync// be less intrusive, give other work priority most of the time
43-
let!_parsingOptions,projectOptions= projectInfoManager.TryGetOptionsForDocumentOrProject(document)
43+
let!_,_,projectOptions= projectInfoManager.TryGetOptionsForDocumentOrProject(document)
4444
let!sourceText= document.GetTextAsync(cancellationToken)
4545
let!_,_,checkResults= checkerProvider.Checker.ParseAndCheckDocument(document, projectOptions, sourceText= sourceText, allowStaleResults=false, userOpName=userOpName)
4646
// it's crucial to not return duplicated or overlapping `ClassifiedSpan`s because Find Usages service crashes.

‎vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ type internal FSharpDocumentDiagnosticAnalyzer() =
122122
overridethis.AnalyzeSemanticsAsync(document:Document,cancellationToken:CancellationToken):Task<ImmutableArray<Diagnostic>>=
123123
letprojectInfoManager= getProjectInfoManager document
124124
asyncMaybe{
125-
let!parsingOptions,projectOptions= projectInfoManager.TryGetOptionsForDocumentOrProject(document)
125+
let!parsingOptions,_,projectOptions= projectInfoManager.TryGetOptionsForDocumentOrProject(document)
126126
let!sourceText= document.GetTextAsync(cancellationToken)
127127
let!textVersion= document.GetTextVersionAsync(cancellationToken)
128128
return!

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp