Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bazel-bsp default version #32

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 16 additions & 0 deletions src/bsp/bsp-ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions src/test-explorer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -206,6 +211,7 @@ export class BazelBSPBuildClient
capabilities: {
languageIds: SUPPORTED_LANGUAGES,
},
data: initData,
})

// Notify the build server that client initialization is complete.
Expand Down
5 changes: 5 additions & 0 deletions src/test/suite/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading