Skip to content

Commit

Permalink
turn off flags in indexing event (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik authored Jun 25, 2024
1 parent e5d5f8d commit 983fab6
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions server/src/services/initialization/onInitialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
import { ServerState } from "../../types";
import { tokensTypes } from "../semanticHighlight/tokenTypes";
import { isSlangSupported } from "../../parser/slangHelpers";
import { getPlatform } from "../../utils/operatingSystem";
import { indexWorkspaceFolders } from "./indexWorkspaceFolders";
import { updateAvailableSolcVersions } from "./updateAvailableSolcVersions";
import { fetchFeatureFlags, isFeatureEnabled } from "./featureFlags";
Expand Down Expand Up @@ -68,25 +67,16 @@ export const onInitialize = (serverState: ServerState) => {
machineId
);
// Index and analysis
await serverState.telemetry.trackTiming(
"indexing",
async (transaction) => {
await indexWorkspaceFolders(
serverState,
serverState.workspaceFileRetriever,
workspaceFolders,
transaction
);

return { status: "ok", result: null };
},
{
platform: getPlatform(),
slangSupported,
semanticTokensEnabled,
documentSymbolsEnabled,
}
);
await serverState.telemetry.trackTiming("indexing", async (transaction) => {
await indexWorkspaceFolders(
serverState,
serverState.workspaceFileRetriever,
workspaceFolders,
transaction
);

return { status: "ok", result: null };
});

// Build and return InitializeResult
const result: InitializeResult = {
Expand Down

0 comments on commit 983fab6

Please sign in to comment.