-
Notifications
You must be signed in to change notification settings - Fork 301
feat: compile CI to a binary with bun #3101
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
base: main
Are you sure you want to change the base?
Conversation
@@ -15,22 +15,14 @@ | |||
*/ |
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 will move this out to ../commands, just here for now while in draft.
@@ -63,61 +64,61 @@ | |||
}, | |||
"author": "genkit", | |||
"license": "Apache-2.0", | |||
"types": "./lib/types/types/index.d.ts", | |||
"types": "./lib/types/src/types/index.d.ts", |
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.
this is required as the package.json is included in the build now, which lives above src
e72b3b3
to
a22d785
Compare
036207a
to
b2afcc7
Compare
b2afcc7
to
9e8229c
Compare
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.
Pull Request Overview
This draft PR introduces changes to enable compiling the CLI into binaries using Bun and integrates a new CI workflow to build and test these binaries on multiple platforms. Key changes include:
- Updates to tsconfig and package.json files to support Bun-specific compiler options and type definitions.
- Refactoring of error handling utilities and removal of legacy argument parsing in favor of Commander commands.
- Addition of a new GitHub Actions workflow for building and testing CLI binaries.
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
genkit-tools/common/tsconfig.json | Added "resolveJsonModule" and a trailing comma for proper JSON configuration. |
genkit-tools/common/src/utils/utils.ts | Refactored error handling to use the new isConnectionRefusedError helper. |
genkit-tools/common/src/utils/package.ts | Simplified package import by using direct JSON import instead of file system reads. |
genkit-tools/common/src/utils/errors.ts | Added utility functions to normalize error handling across Node.js and Bun environments. |
genkit-tools/common/package.json | Updated types paths in exports and added "bun-types" as a dependency. |
genkit-tools/cli/tsconfig.json | Included "bun-types" and enabled "resolveJsonModule" for improved module resolution. |
genkit-tools/cli/src/utils/server-harness.ts | Replaced legacy argument parsing with a Commander command for starting the server and redirecting output. |
genkit-tools/cli/src/commands/ui-start.ts | Updated to spawn the process using process.execPath along with the new CLI command interface. |
genkit-tools/cli/src/cli.ts | Integrated the new uiStartServer command based on process arguments. |
genkit-tools/cli/package.json | Introduced a new "compile:bun" script and updated Bun-related dependencies. |
.github/workflows/build-cli-binaries.yml | Added a CI workflow to compile CLI binaries across various OS and architecture targets using Bun. |
Files not reviewed (1)
- genkit-tools/pnpm-lock.yaml: Language not supported
648d085
to
8394ced
Compare
This is a draft PR to:
bun
bun
Checklist (if applicable):