From ee3a710b7cc8ee75e11255d54aae8cae1350a793 Mon Sep 17 00:00:00 2001 From: Camden Cheek Date: Thu, 1 Aug 2024 18:02:53 -0600 Subject: [PATCH] Chore: remove enablePreciseOccurrences feature flag (#64229) Just removes a redundant feature flag. --- .../(validrev)/(code)/-/blob/[...path]/+page.ts | 6 +----- schema/schema.go | 3 --- schema/settings.schema.json | 5 ----- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/client/web-sveltekit/src/routes/[...repo=reporev]/(validrev)/(code)/-/blob/[...path]/+page.ts b/client/web-sveltekit/src/routes/[...repo=reporev]/(validrev)/(code)/-/blob/[...path]/+page.ts index 388a9ed9418..54595ccfa33 100644 --- a/client/web-sveltekit/src/routes/[...repo=reporev]/(validrev)/(code)/-/blob/[...path]/+page.ts +++ b/client/web-sveltekit/src/routes/[...repo=reporev]/(validrev)/(code)/-/blob/[...path]/+page.ts @@ -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 diff --git a/schema/schema.go b/schema/schema.go index 2d76ec070fb..aeb2bc7b464 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -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") diff --git a/schema/settings.schema.json b/schema/settings.schema.json index 2b0389f4a8c..01a43fe68a4 100644 --- a/schema/settings.schema.json +++ b/schema/settings.schema.json @@ -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"