diff --git a/package.json b/package.json index c2bbccd..3a6fe25 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "bazelbsp.serverVersion": { "type": "string", - "default": "3.2.0-20240606-167e699-NIGHTLY", + "default": "3.2.0-20250106-a42f8bf24-NIGHTLY", "description": "Version of the Bazel BSP server to install." }, "bazelbsp.bazelBinaryPath": { diff --git a/src/bsp/bsp-ext.ts b/src/bsp/bsp-ext.ts index da08036..bf86b97 100644 --- a/src/bsp/bsp-ext.ts +++ b/src/bsp/bsp-ext.ts @@ -70,3 +70,19 @@ export interface JUnitStyleTestCaseData { fullError?: string errorType?: string } + +export interface InitializeBuildData { + clientClassesRootDir?: string + openTelemetryEndpoint?: string + featureFlags?: FeatureFlags +} + +export interface FeatureFlags { + isPythonSupportEnabled?: boolean + isAndroidSupportEnabled?: boolean + isGoSupportEnabled?: boolean + isRustSupportEnabled?: boolean + isPropagateExportsFromDepsEnabled?: boolean + /** Bazel specific */ + bazelSymlinksScanMaxDepth?: number +} diff --git a/src/test-explorer/client.ts b/src/test-explorer/client.ts index 3365cbb..4366442 100644 --- a/src/test-explorer/client.ts +++ b/src/test-explorer/client.ts @@ -198,6 +198,11 @@ export class BazelBSPBuildClient // Send initialize request to the server. try { const rootUri = Utils.getWorkspaceRoot() + const initData: bspExt.InitializeBuildData = { + featureFlags: { + isPythonSupportEnabled: true, + }, + } const initResult = await conn.sendRequest(bsp.BuildInitialize.type, { displayName: 'VS Code Bazel BSP', version: pkg.version, @@ -206,6 +211,7 @@ export class BazelBSPBuildClient capabilities: { languageIds: SUPPORTED_LANGUAGES, }, + data: initData, }) // Notify the build server that client initialization is complete. diff --git a/src/test/suite/client.test.ts b/src/test/suite/client.test.ts index de71086..7e85aca 100644 --- a/src/test/suite/client.test.ts +++ b/src/test/suite/client.test.ts @@ -105,6 +105,11 @@ suite('Build Client', () => { assert.ok(initRequest.args[1].capabilities) assert.ok(initRequest.args[1].rootUri) assert.ok(initRequest.args[1].version) + assert.deepStrictEqual(initRequest.args[1].data, { + featureFlags: { + isPythonSupportEnabled: true, + }, + }) // Check that initialization result has been sent to the server. assert.equal(initNotificationStub.callCount, 1)