Chore: remove enablePreciseOccurrences feature flag (#64229)

Just removes a redundant feature flag.
This commit is contained in:
Camden Cheek 2024-08-01 18:02:53 -06:00 committed by GitHub
parent e6ae7d44b2
commit ee3a710b7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 13 deletions

View File

@ -192,11 +192,7 @@ async function loadFileView({ parent, params, url }: PageLoadEvent) {
)
.then(mapOrThrow(result => result.data?.repository?.commit?.blob?.highlight ?? null)),
codeGraphData: resolvedRevision.then(async resolvedRevision => {
if ((await parent()).settings.experimentalFeatures?.enablePreciseOccurrences ?? false) {
return fetchCodeGraphData(client, repoName, resolvedRevision, filePath)
} else {
return []
}
return fetchCodeGraphData(client, repoName, resolvedRevision, filePath)
}),
// We can ignore the error because if the revision doesn't exist, other queries will fail as well
revisionOverride: revisionOverride

View File

@ -2951,8 +2951,6 @@ type SettingsExperimentalFeatures struct {
EnableLazyBlobSyntaxHighlighting *bool `json:"enableLazyBlobSyntaxHighlighting,omitempty"`
// EnableLazyFileResultSyntaxHighlighting description: Fetch un-highlighted file result contents to render immediately, decorate with syntax highlighting once loaded.
EnableLazyFileResultSyntaxHighlighting *bool `json:"enableLazyFileResultSyntaxHighlighting,omitempty"`
// EnablePreciseOccurrences description: Enable the new precise occurrences API, which can provide more accurate hovers for some languages.
EnablePreciseOccurrences bool `json:"enablePreciseOccurrences,omitempty"`
// EnableSearchFilePrefetch description: Pre-fetch plaintext file revisions from search results on hover/focus.
EnableSearchFilePrefetch *bool `json:"enableSearchFilePrefetch,omitempty"`
// EnableSidebarFilePrefetch description: Pre-fetch plaintext file revisions from sidebar on hover/focus.
@ -3035,7 +3033,6 @@ func (v *SettingsExperimentalFeatures) UnmarshalJSON(data []byte) error {
delete(m, "codeMonitoringWebHooks")
delete(m, "enableLazyBlobSyntaxHighlighting")
delete(m, "enableLazyFileResultSyntaxHighlighting")
delete(m, "enablePreciseOccurrences")
delete(m, "enableSearchFilePrefetch")
delete(m, "enableSidebarFilePrefetch")
delete(m, "fuzzyFinder")

View File

@ -227,11 +227,6 @@
"description": "DEPRECATED: this setting is no longer used. To disable keyword search, set `search.defaultPatternType: standard` instead.",
"type": "boolean",
"default": true
},
"enablePreciseOccurrences": {
"description": "Enable the new precise occurrences API, which can provide more accurate hovers for some languages.",
"type": "boolean",
"default": true
}
},
"group": "Experimental"