-
-
Notifications
You must be signed in to change notification settings - Fork 735
build(linter/plugins): build either release or debug version, not both #15949
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
build(linter/plugins): build either release or debug version, not both #15949
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 PR consolidates the Oxlint build process to generate either a release or debug build based on the DEBUG environment variable, eliminating the need to produce both builds simultaneously. When DEBUG=true, the build includes debug assertions for testing; otherwise, it produces an optimized release build with assertions removed.
Key Changes
- Unified build configuration using a
DEBUGenvironment variable to control assertion inclusion - Updated test scripts to use the single
dist/output directory instead of a separatedebug/directory - Removed duplicate build artifacts and unnecessary file operations from the build script
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/oxlint/tsdown.config.ts | Consolidated two build configs into one controlled by DEBUG env var; moved ASSERTS_PATH into plugin function |
| apps/oxlint/test/e2e.test.ts | Updated CLI path from debug/cli.js to dist/cli.js |
| apps/oxlint/scripts/build.ts | Removed debug directory operations (cli.d.ts deletion and .node file copying) |
| apps/oxlint/package.json | Updated build-dev and build-test scripts to set DEBUG=true; changed import path to dist/ |
| apps/oxlint/.gitignore | Removed /debug/ directory from gitignore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9fe5682 to
5004d5f
Compare
Merge activity
|
#15949) #15921 added a debug build for Oxlint, and various PRs since have tweaked it. However, I now realize there's little point in generating *both* a release build and debug build. Just create one build, and use env var `DEBUG` to control whether it has debug assertions included in it or not. `pnpm run build` produces release build with no debug assertions, `pnpm run build-test` includes the asserts. I've verified that both do what they're meant to.
5004d5f to
80fe39d
Compare

#15921 added a debug build for Oxlint, and various PRs since have tweaked it. However, I now realize there's little point in generating both a release build and debug build.
Just create one build, and use env var
DEBUGto control whether it has debug assertions included in it or not.pnpm run buildproduces release build with no debug assertions,pnpm run build-testincludes the asserts. I've verified that both do what they're meant to.