-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Inline tree-sitter wasm and add runtime fallback #11157
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
Conversation
Summary of ChangesHello @cornmander, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the reliability and error handling of Tree-sitter WASM module loading within the project. By inlining WASM binaries during the build and providing a runtime fallback to disk-based loading, it addresses potential module resolution issues. Furthermore, it refines error reporting by explicitly differentiating between parser initialization failures and actual parsing errors, leading to a more stable and debuggable system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a robust mechanism for loading tree-sitter WASM binaries by inlining them into the bundle and providing a runtime fallback to load from disk. This is a great improvement for environments where dynamic imports of WASM might not be supported. The changes also significantly improve error handling by disambiguating initialization errors from parsing errors, making the system more resilient and easier to debug. The implementation is well-structured, particularly the logic in shell-utils.ts for handling WASM loading and error propagation. I have one suggestion to improve the robustness of the error detection for the fallback mechanism.
| /Package subpath/.test(error.message) || | ||
| /Unknown file extension/.test(error.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regular expressions used here to detect specific error messages are a bit too broad and could potentially match unrelated errors, leading to the fallback mechanism being triggered incorrectly. This could mask the underlying issue.
To make these checks more robust, I recommend making the regex more specific to the expected error messages.
For example:
Package subpathcould bePackage subpath .* is not defined by "exports"Unknown file extensioncould beUnknown file extension ".*" for
This will help ensure that we only fall back to reading from disk for the intended import failures.
| /Package subpath/.test(error.message) || | |
| /Unknown file extension/.test(error.message) | |
| /Package subpath .* is not defined by "exports"/.test(error.message) || | |
| /Unknown file extension ".*" for/.test(error.message) |
560979a to
be1800f
Compare
|
Size Change: +2.3 MB (+12.91%) Total Size: 20.1 MB
ℹ️ View Unchanged
|
be1800f to
da1370e
Compare
jacob314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for the new behavior verifying that the regression identified in the previous pr is fixed.
7a908b6 to
d484138
Compare
This reverts commit bd5c158.
d484138 to
1e034f2
Compare
|
Done |
|
|
||
| describe('Flicker Detector', () => { | ||
| it('should not detect a flicker under the max height budget', async () => { | ||
| // TODO: https://github.com/google-gemini/gemini-cli/issues/11170 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed? I believe this got fixed earlier today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this in a subsequent PR.
jacob314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| const requireModule = createModuleRequire(import.meta.url); | ||
|
|
||
| export async function readWasmBinaryFromDisk( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nit: bonus points add a trivial unittest for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this in a subsequent PR.
| build.onResolve({ filter: /\.wasm\?binary$/ }, (args) => { | ||
| const specifier = args.path.replace(/\?binary$/, ''); | ||
| const resolveDir = args.resolveDir || ''; | ||
| const isBareSpecifier = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we really need both the isBareSpecified and relative file path cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll investigate this in a subsequent PR.
| "types": ["node", "vitest/globals"] | ||
| }, | ||
| "include": ["index.ts", "src/**/*.ts", "src/**/*.json"], | ||
| "include": ["index.ts", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.json"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cornmander @jacob314 this is a breaking change that causes the builds to fail in nightly and release. It also exhibits his behavior if you run 'npm run build' locally more than 1 time.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/index.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/agents/registry.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/agents/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/code_assist/codeAssist.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/code_assist/oauth2.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/code_assist/server.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/code_assist/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/commands/extensions.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/config/config.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/config/constants.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/config/models.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/config/storage.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/confirmation-bus/message-bus.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/confirmation-bus/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/baseLlmClient.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/client.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/contentGenerator.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/coreToolScheduler.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/geminiChat.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/geminiRequest.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/logger.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/loggingContentGenerator.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/nonInteractiveToolExecutor.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/prompts.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/tokenLimits.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/core/turn.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/fallback/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/constants.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/detect-ide.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/ide-client.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/ide-installer.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/ideContext.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/ide/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/index.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/mcp/oauth-provider.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/mcp/oauth-token-storage.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/mcp/oauth-utils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/mcp/token-storage/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/output/json-formatter.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/output/stream-json-formatter.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/output/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/policy/policy-engine.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/policy/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/prompts/mcp-prompts.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/prompts/prompt-registry.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/routing/modelRouterService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/routing/routingStrategy.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/chatRecordingService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/fileDiscoveryService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/fileSystemService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/gitService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/loopDetectionService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/services/shellExecutionService.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/activity-detector.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/activity-monitor.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/activity-types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/config.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/gcp-exporters.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/high-water-mark-tracker.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/index.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/loggers.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/memory-monitor.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/metrics.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/rate-limiter.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/sdk.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/tool-call-decision.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/types.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/telemetry/uiTelemetry.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/test-utils/config.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/test-utils/index.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/test-utils/mock-tool.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/edit.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/glob.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/grep.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/ls.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/mcp-client.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/mcp-tool.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/memoryTool.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/modifiable-tool.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/read-file.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/read-many-files.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/ripGrep.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/shell.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/tool-error.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/tool-names.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/tool-registry.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/tools.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/web-fetch.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/web-search.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/write-file.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/tools/write-todos.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/browser.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/debugLogger.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/editor.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/errorParsing.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/errors.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/events.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/fileUtils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/filesearch/fileSearch.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/formatters.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/generateContentResponseUtilities.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/getFolderStructure.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/getPty.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/gitIgnoreParser.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/gitUtils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/googleErrors.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/googleQuotaErrors.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/ignorePatterns.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/memoryDiscovery.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/partUtils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/pathReader.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/paths.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/promptIdContext.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/quotaErrorDetection.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/retry.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/schemaValidator.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/session.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/shell-utils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/systemEncoding.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/terminalSerializer.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/textUtils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/thoughtUtils.d.ts' because it would overwrite input file.
error TS5055: Cannot write file '/Users/mattkorwel/dev/main/packages/core/dist/src/utils/workspaceContext.d.ts' because it would overwrite input file.
Found 125 errors.
node:internal/errors:984
const err = new Error(message);
^
Error: Command failed: tsc --build
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at file:///Users/mattkorwel/dev/main/scripts/build_package.js:30:1
at ModuleJob.run (node:internal/modules/esm/module_job:325:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:606:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) {
status: 2,
signal: null,
output: [ null, null, null ],
pid: 93965,
stdout: null,
stderr: null
}
Node.js v20.19.5
npm error Lifecycle script `build` failed with error:
npm error code 1
npm error path /Users/mattkorwel/dev/main/packages/cli
npm error workspace @google/[email protected]
npm error location /Users/mattkorwel/dev/main/packages/cli
npm error command failed
npm error command sh -c node ../../scripts/build_package.js
|
Reverting this change to unblock nightly builds. Please feel free to @ me for guidance on how to get this back in asap. 🙇 |
|
We'll actually auto revert didn't work, so i'll make the smaller change to remove the d.ts files from the core tsconfig.json inputs. If this breaks the behavior here lets talk. |

Resubmit of #11073
Inline tree-sitter wasm and add runtime fallback to fix execution of the CLI from bundled formats.
Disambiguate initialization errors from parse errors so that runtime errors are less confusing.