Skip to content

Commit 86c2f2a

Browse files
authored
fix(amazonq): no starting LSP in AL2 (#7096)
## Problem LSP cannot run in AL2 due to glibc compatibility. ## Solution Do not start LSP in AL2. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 96dd2db commit 86c2f2a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/amazonq/src/extension.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { registerCommands } from './commands'
4343
import { focusAmazonQPanel } from 'aws-core-vscode/codewhispererChat'
4444
import { activate as activateAmazonqLsp } from './lsp/activation'
4545
import { activate as activateInlineCompletion } from './app/inline/activation'
46+
import { isAmazonInternalOs } from 'aws-core-vscode/shared'
4647

4748
export const amazonQContextPrefix = 'amazonq'
4849

@@ -119,7 +120,10 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
119120
}
120121
// This contains every lsp agnostic things (auth, security scan, code scan)
121122
await activateCodeWhisperer(extContext as ExtContext)
122-
if (Experiments.instance.get('amazonqLSP', false) || Auth.instance.isInternalAmazonUser()) {
123+
if (
124+
(Experiments.instance.get('amazonqLSP', false) || Auth.instance.isInternalAmazonUser()) &&
125+
!isAmazonInternalOs()
126+
) {
123127
// start the Amazon Q LSP for internal users first
124128
await activateAmazonqLsp(context)
125129
}

packages/core/src/shared/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export * from './extensionUtilities'
1818
export * from './extensionStartup'
1919
export { RegionProvider } from './regions/regionProvider'
2020
export { Commands } from './vscode/commands2'
21-
export { getMachineId, getServiceEnvVarConfig } from './vscode/env'
21+
export { getMachineId, getServiceEnvVarConfig, isAmazonInternalOs } from './vscode/env'
2222
export { getLogger } from './logger/logger'
2323
export { activateExtension, openUrl } from './utilities/vsCodeUtils'
2424
export { waitUntil, sleep, Timeout } from './utilities/timeoutUtils'

0 commit comments

Comments
 (0)