Open
Conversation
161c965 to
58829e0
Compare
satyakigh
reviewed
Jan 29, 2026
| test: /\.wasm$/, | ||
| type: 'asset/resource', | ||
| generator: { | ||
| filename: '[name][ext]', |
Collaborator
There was a problem hiding this comment.
Does this need to be [name].[ext]?
| } | ||
|
|
||
| // Environment detection and factory creation | ||
| const shouldForceWasm = (): boolean => { |
Collaborator
There was a problem hiding this comment.
Should this check whether we are on legacy linux instead of checking environment variable? Think this can just be a variable instead of a function
| log.info('Forcing WASM tree-sitter implementation (CLOUDFORMATIONLSP_USE_WASM=true)'); | ||
| const wasmFactory = new WasmParserFactory(); | ||
| // eslint-disable-next-line unicorn/prefer-top-level-await | ||
| wasmFactory.initialize().catch((error: unknown) => { |
Collaborator
There was a problem hiding this comment.
If initialization fails, should it fallback to native?
| // Initialize the factory - async initialization happens in background | ||
| let factoryInstance: ParserFactory; | ||
|
|
||
| if (shouldForceWasm()) { |
Collaborator
There was a problem hiding this comment.
We probably want to run some of the e2e/integration tests with this flag enabled so we know everything is working correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.