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

Commit40d789c

Browse files
authored
VS enable diagnostics for unopened files (#15591)
* internalerror with MakeValueAssign fixed?* Add in optional setting for solution-wide background analysis* fix* telementry - lang service started will report background analysis flag
1 parentb4c26d8 commit40d789c

18 files changed

+176
-17
lines changed

‎vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ type internal FSharpWorkspaceServiceFactory [<Composition.ImportingConstructor>]
146146
letcaptureIdentifiersWhenParsing=
147147
editorOptions.LanguageServicePerformance.CaptureIdentifiersWhenParsing
148148

149+
// Default is false here
150+
letsolutionCrawler= editorOptions.Advanced.SolutionBackgroundAnalysis
151+
149152
use_eventDuration=
150153
TelemetryReporter.ReportSingleEventWithDuration(
151154
TelemetryEvents.LanguageServiceStarted,
@@ -163,6 +166,7 @@ type internal FSharpWorkspaceServiceFactory [<Composition.ImportingConstructor>]
163166
nameof enableBackgroundItemKeyStoreAndSemanticClassification,
164167
enableBackgroundItemKeyStoreAndSemanticClassification
165168
nameof captureIdentifiersWhenParsing, captureIdentifiersWhenParsing
169+
nameof solutionCrawler, solutionCrawler
166170
|],
167171
TelemetryThrottlingStrategy.NoThrottling
168172
)
@@ -423,28 +427,23 @@ type internal FSharpLanguageService(package: FSharpPackage) =
423427
override_.Initialize()=
424428
base.Initialize()
425429

426-
letglobalOptions=
427-
package
428-
.ComponentModel
429-
.DefaultExportProvider
430-
.GetExport<FSharpGlobalOptions>()
431-
.Value
430+
letexportProvider= package.ComponentModel.DefaultExportProvider
431+
letglobalOptions= exportProvider.GetExport<FSharpGlobalOptions>().Value
432432

433-
globalOptions.BlockForCompletionItems<-false
434-
globalOptions.SetBackgroundAnalysisScope(openFilesOnly=true)
433+
letworkspace= package.ComponentModel.GetService<VisualStudioWorkspace>()
435434

436-
letglobalOptions=
437-
package
438-
.ComponentModel
439-
.DefaultExportProvider
440-
.GetExport<FSharpGlobalOptions>()
441-
.Value
435+
letsolutionAnalysis=
436+
workspace
437+
.Services
438+
.GetService<EditorOptions>()
439+
.Advanced
440+
.SolutionBackgroundAnalysis
442441

443-
globalOptions.BlockForCompletionItems<-false
442+
globalOptions.SetBackgroundAnalysisScope(openFilesOnly=not solutionAnalysis)
444443

445-
lettheme=
446-
package.ComponentModel.DefaultExportProvider.GetExport<ISetThemeColors>().Value
444+
globalOptions.BlockForCompletionItems<-false
447445

446+
lettheme= exportProvider.GetExport<ISetThemeColors>().Value
448447
theme.SetColors()
449448

450449
override_.ContentTypeName= FSharpConstants.FSharpContentTypeName

‎vsintegration/src/FSharp.Editor/Options/EditorOptions.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ type AdvancedOptions =
114114
IsInlineReturnTypeHintsEnabled:bool
115115
IsLiveBuffersEnabled:bool
116116
SendAdditionalTelemetry:bool
117+
SolutionBackgroundAnalysis:bool
117118
}
118119

119120
static memberDefault=
@@ -125,6 +126,7 @@ type AdvancedOptions =
125126
IsInlineReturnTypeHintsEnabled=false
126127
IsLiveBuffersEnabled= FSharpExperimentalFeaturesEnabledAutomatically
127128
SendAdditionalTelemetry=true
129+
SolutionBackgroundAnalysis=false
128130
}
129131

130132
[<CLIMutable>]

‎vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
<CheckBoxx:Name="toggleSendAdditionalTelemetry"IsChecked="{Binding SendAdditionalTelemetry}"
4343
Content="{x:Static local:Strings.Send_Additional_Telemetry}"/>
4444
</GroupBox>
45+
<GroupBoxHeader="{x:Static local:Strings.Background_analysis}">
46+
<CheckBoxx:Name="toggleSolutionBackgroundAnalysis"IsChecked="{Binding SolutionBackgroundAnalysis}"
47+
Content="{x:Static local:Strings.Analyze_full_solution_on_background}"/>
48+
</GroupBox>
4549
</StackPanel>
4650
</ScrollViewer>
4751
</Grid>

‎vsintegration/src/FSharp.UIResources/Strings.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/Strings.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,10 @@
276276
<dataname="Show_Return_Type_Hints"xml:space="preserve">
277277
<value>Display return type hints (preview)</value>
278278
</data>
279+
<dataname="Analyze_full_solution_on_background"xml:space="preserve">
280+
<value>Keep analyzing the entire solution for diagnostics as a low priority background task (requires restart)</value>
281+
</data>
282+
<dataname="Background_analysis"xml:space="preserve">
283+
<value>Background analysis</value>
284+
</data>
279285
</root>

‎vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp