Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 21, 2025

#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.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Nov 21, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@overlookmotel overlookmotel marked this pull request as ready for review November 21, 2025 16:40
Copilot AI review requested due to automatic review settings November 21, 2025 16:40
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Nov 21, 2025
Copilot finished reviewing on behalf of overlookmotel November 21, 2025 16:43
Copy link
Contributor

Copilot AI left a 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 DEBUG environment variable to control assertion inclusion
  • Updated test scripts to use the single dist/ output directory instead of a separate debug/ 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.

@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Nov 21, 2025
@overlookmotel overlookmotel force-pushed the 11-21-build_linter_plugins_build_either_release_or_debug_version_not_both branch from 9fe5682 to 5004d5f Compare November 21, 2025 19:22
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 23, 2025
Copy link
Contributor

camc314 commented Nov 23, 2025

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.
@graphite-app graphite-app bot force-pushed the 11-21-build_linter_plugins_build_either_release_or_debug_version_not_both branch from 5004d5f to 80fe39d Compare November 23, 2025 12:11
@graphite-app graphite-app bot merged commit 80fe39d into main Nov 23, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-21-build_linter_plugins_build_either_release_or_debug_version_not_both branch November 23, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-cli Area - CLI A-editor Area - Editor and Language Server A-linter Area - Linter A-linter-plugins Area - Linter JS plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants