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

Commit716b8e9

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

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
@@ -1397,7 +1397,7 @@ type FSharpParsingOptions =
13971397
}
13981398

13991399
static memberFromTcConfigBuidler(tcConfigB:TcConfigBuilder,sourceFiles)=
1400-
{
1400+
{
14011401
SourceFiles= sourceFiles
14021402
ConditionalCompilationDefines= tcConfigB.conditionalCompilationDefines
14031403
ErrorSeverityOptions= tcConfigB.errorSeverityOptions
@@ -1725,7 +1725,7 @@ type FSharpProjectOptions =
17251725
memberx.ProjectOptions= x.OtherOptions
17261726
/// Whether the two parse options refer to the same project.
17271727
static memberUseSameProjectFileName(options1,options2)=
1728-
options1.ProjectFileName= options2.ProjectFileName
1728+
options1.ProjectFileName= options2.ProjectFileName
17291729

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

17441746
/// Compute the project directory.
@@ -2050,11 +2052,11 @@ module Helpers =
20502052

20512053
// Look for DLLs in the location of the service DLL first.
20522054
letdefaultFSharpBinariesDir= FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(Some(typeof<FSharpCheckFileAnswer>.Assembly.Location)).Value
2053-
2055+
20542056
/// Determine whether two (fileName,options) keys are identical w.r.t. affect on checking
2055-
letAreSameForChecking2((fileName1:string,options1:FSharpProjectOptions),(fileName2,o2))=
2057+
letAreSameForChecking2((fileName1:string,options1:FSharpProjectOptions),(fileName2,options2))=
20562058
(fileName1= fileName2)
2057-
&& FSharpProjectOptions.AreSameForChecking(options1,o2)
2059+
&& FSharpProjectOptions.AreSameForChecking(options1,options2)
20582060

20592061
/// Determine whether two (fileName,options) keys should be identical w.r.t. resource usage
20602062
letAreSubsumable2((fileName1:string,o1:FSharpProjectOptions),(fileName2:string,o2:FSharpProjectOptions))=
@@ -2720,7 +2722,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC
27202722
memberbc.InvalidateConfiguration(options:FSharpProjectOptions,startBackgroundCompileIfAlreadySeen,userOpName)=
27212723
letstartBackgroundCompileIfAlreadySeen= defaultArg startBackgroundCompileIfAlreadySeen implicitlyStartBackgroundWork
27222724
// This operation can't currently be cancelled nor awaited
2723-
reactor.EnqueueOp(userOpName,"InvalidateConfiguration", options.ProjectFileName,fun ctok->
2725+
reactor.EnqueueOp(userOpName,"InvalidateConfiguration: Stamp("+(options.Stamp|> Option.defaultValue0L).ToString()+")", options.ProjectFileName,fun ctok->
27242726
// If there was a similar entry then re-establish an empty builder . This is a somewhat arbitrary choice - it
27252727
// will have the effect of releasing memory associated with the previous builder, but costs some time.
27262728
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