Skip to content

xtask: add release-fast profile and allow dev --no-byte-compile - #867

Merged
eval-exec merged 1 commit into
mainfrom
xtask/release-fast-and-dev-profile
Nov 27, 2026
Merged

eval-exec merged 1 commit into
mainfrom
xtask/release-fast-and-dev-profile

Conversation

@eval-exec

@eval-exec eval-exec commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Improves developer iteration speed and --profile discoverability for cargo xtask fresh-build:

  • Add [profile.release-fast] in Cargo.toml (inherits = "release", lto = false, codegen-units = 16, incremental = true, debug = "line-tables-only"), outputting to target/release-fast so day-to-day GUI/editor dev gets fast incremental relinks without paying fat LTO or disturbing target/release / target/debug.
  • Allow --profile dev when --no-byte-compile is passed (outputs to target/debug, reuses existing .elc files, keeps debug_assertions enabled while third-party deps remain at opt-level = 3). --profile dev without --no-byte-compile, --profile debug, and --profile test remain rejected with actionable hints.
  • Clarify --profile NAME in cargo xtask fresh-build --help with a single scannable list of built-in profiles (release, release-fast, profiling, release-pgo, release-pgo-profiling, dev) and accurate symbol wording (strip=none, debug=false).
  • Add unit tests in crates/xtask/src/tests/main_test.rs covering release-fast, dev with/without --no-byte-compile, and debug rejection.

Context

Related discussion: #855 (comment) (cc @darkhandz).

Verification

  • cargo test -p xtask — 240 passed, 0 failed.
  • cargo xtask fresh-build --help — verified formatted --profile output.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds a release-fast Cargo profile and enables it as a shipping PGO consumer. Fresh-build profile selection now permits unoptimized profiles only with --no-byte-compile, rejects debug and test, and documents and tests these rules.

Changes: Build profile support

Layer / File(s) Summary
Define release-fast profile
Cargo.toml, crates/xtask/src/main.rs, crates/xtask/src/pgo.rs
release-fast inherits release settings and sets LTO off, 16 codegen units, incremental compilation, and line-table debug information. BuildProfile adds ReleaseFast, which the PGO codegen contract accepts as a shipping profile.
Apply fresh-build profile rules
crates/xtask/src/main.rs, crates/xtask/src/tests/main_test.rs
Fresh-build parsing rejects debug and test, and requires --no-byte-compile for unoptimized profiles. Usage text documents profiles, output paths, PGO profiles, and restrictions. Tests cover release-fast, dev, and debug selection.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: Minimal · up to 7da1b

The change adds a release-fast profile and permits --profile dev only with --no-byte-compile, rejecting debug and test with hints. Review found no concrete defects. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main changes: a new release-fast Cargo profile and allowing dev with --no-byte-compile. Both appear in the raw summary (Cargo.toml profile, main.rs parser changes, pgo.rs consu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the PR adds a release-fast profile in Cargo.toml, allows --profile dev with --no-byte-compile, clarifies the fresh-build --help profile list, and adds unit tests in main…
Full details: Title check

Explanation

The title names the two main changes: a new release-fast Cargo profile and allowing dev with --no-byte-compile. Both appear in the raw summary (Cargo.toml profile, main.rs parser changes, pgo.rs consumer acceptance). The title is specific and accurate, so it passes.

Full details: Description check

Explanation

The description states the PR adds a release-fast profile in Cargo.toml, allows --profile dev with --no-byte-compile, clarifies the fresh-build --help profile list, and adds unit tests in main_test.rs. These points match the changeset summaries and objectives, so the description is specific and on-topic.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1170596b-6e07-4a07-977d-bed20589ba7a
Commits

Reviewing files that changed from the base of the PR and between e505d3d and 7da1b43.

Files selected for processing: 4

  • Cargo.toml
  • crates/xtask/src/main.rs
  • crates/xtask/src/pgo.rs
  • crates/xtask/src/tests/main_test.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Finishing Touches
Fix failing CI checks

  • Commit to this branch
  • Create a new PR

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge, with the previous non-blocking help correction still outstanding.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous non-blocking help correction still outstanding.

FindingsFix All in CodexFindings

  1. P2 Help gives wrong debug setting ▶
Fix with agent prompt
### Issue 1
crates/xtask/src/main.rs:undefined-4973
The new help says `release-pgo-profiling` uses `debug=false`, but a normal build selects `CodegenContract::Diagnostic` and sets `CARGO_PROFILE_RELEASE_PGO_PROFILING_DEBUG=2`. Developers choosing a build for measurements therefore get full debug info despite what the help says. Describe the setting the pipeline actually uses.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds release-fast for incremental optimized builds and allows dev with --no-byte-compile.

  • Developers can build optimized editor binaries with a faster, separate profile.
  • dev builds can skip Lisp byte-compilation and reuse existing .elc files.
  • The --profile help lists built-in profiles with their key details together.

Reviews (2) · Last reviewed commit: "xtask: add release-fast profile and allo..." · Reviewed by Greptile

Comment thread crates/xtask/src/main.rs
(-17%) and batch/byte-compile (-17..-27%);
does not speed up interactive redisplay.
release-pgo-profiling Two-pass PGO build with function symbols
(strip=none, debug=false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Help gives wrong debug setting

The new help says release-pgo-profiling uses debug=false, but a normal build selects CodegenContract::Diagnostic and sets CARGO_PROFILE_RELEASE_PGO_PROFILING_DEBUG=2. Developers choosing a build for measurements therefore get full debug info despite what the help says. Describe the setting the pipeline actually uses.

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/xtask/src/main.rs
Line: 4973

Comment:
**Help gives wrong debug setting**

The new help says `release-pgo-profiling` uses `debug=false`, but a normal build selects `CodegenContract::Diagnostic` and sets `CARGO_PROFILE_RELEASE_PGO_PROFILING_DEBUG=2`. Developers choosing a build for measurements therefore get full debug info despite what the help says. Describe the setting the pipeline actually uses.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

Comment thread crates/xtask/src/main.rs
// `.elc` files) for fast debug-assertion iteration. `debug` is not a
// valid Cargo profile name (Cargo's built-in profile is `dev`, which
// outputs to `target/debug`).
if matches!(profile, BuildProfile::Debug | BuildProfile::Test) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Use-after-move: matches!(profile, ...) moves profile, so later uses fail to compile

BuildProfile does not derive Copy (it has a Custom(String) variant), and matches! matches by value, so line 764 moves profile. The subsequent uses on lines 773 (profile.is_optimized()) and 792 (profile field initializer) are use-after-move (E0382); the crate will not compile.

Fix: match on a reference.

Suggested change
if matches!(profile, BuildProfile::Debug | BuildProfile::Test) {
if matches!(&profile, BuildProfile::Debug | BuildProfile::Test) {

@kilo-code-bot

kilo-code-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
crates/xtask/src/main.rs 764 matches!(profile, ...) moves the non-Copy profile value (BuildProfile has a Custom(String) variant and derives no Copy); matches! matches by value, so the subsequent uses on lines 773 (profile.is_optimized()) and 792 (profile field initializer) are use-after-move (E0382). The crate will not compile, which blocks merge. Carried forward from previous review -- still present in current code. Already has an existing kilo-code-bot inline comment (ID: 4717085426).
Files Reviewed (4 files)
  • Cargo.toml - 0 issues
  • crates/xtask/src/main.rs - 1 issue
  • crates/xtask/src/pgo.rs - 0 issues
  • crates/xtask/src/tests/main_test.rs - 0 issues

Fix these issues in Kilo Cloud

Note: The branch also contains 4 additional JIT/GC/Cranelift commits that are not part of PR #867 diff (gh pr diff 867) and therefore cannot receive inline comments on this PR. Sub-agent review found CRITICAL bugs in crates/neovm-value/src/logging.rs (empty-string RUST_LOG produces invalid EnvFilter spec; hyphenated crate names silently ignored) that should be addressed in a separate review/PR.

Previous Review Summary (commit 7da1b43)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 7da1b43)

Status: 1 Issues Found | Recommendation: Address before merge

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
crates/xtask/src/main.rs 764 matches!(profile, ...) moves the non-Copy profile value (BuildProfile has a Custom(String) variant and derives no Copy); matches! matches by value, so the subsequent uses on lines 773 (profile.is_optimized()) and 792 (profile field initializer) are use-after-move (E0382). The crate will not compile, which blocks merge.
Files Reviewed (4 files)
  • Cargo.toml - 0 issues
  • crates/xtask/src/main.rs - 1 issue
  • crates/xtask/src/pgo.rs - 0 issues
  • crates/xtask/src/tests/main_test.rs - 0 issues

Fix these issues in Kilo Cloud

Note: validation was performed by reading changed code only; cargo test could not be executed in this read-only sandbox. All other changed code (profile help text, PGO codegen contract, unit tests) was reviewed and is consistent with the new validation logic.


Reviewed by free · Input: 187.5K · Output: 56.9K · Cached: 1.5M

@eval-exec
eval-exec force-pushed the xtask/release-fast-and-dev-profile branch from 7da1b43 to dc5956a Compare November 27, 2026 08:35
@eval-exec
eval-exec merged commit ba883aa into main Nov 27, 2026
16 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant