Skip to content

chore: set dev profile debug to 1#907

Merged
jdx merged 1 commit intomainfrom
chore/profile-dev-debug-1
May 3, 2026
Merged

chore: set dev profile debug to 1#907
jdx merged 1 commit intomainfrom
chore/profile-dev-debug-1

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented May 3, 2026

Summary

Reduces target/ disk usage by setting [profile.dev] debug = 1, while keeping backtrace file:line info intact.

The default debug = 2 writes full DWARF — including variable/type info that's only needed when stepping through code in a debugger (lldb/gdb). With debug = 1, panics, RUST_BACKTRACE=1, and error chains still resolve to file:line; only debugger variable inspection is reduced.

In practice this typically shrinks target/ by a meaningful percentage, which adds up across worktrees.

Test plan

  • cargo build still succeeds
  • CI is green

This PR was generated by an AI coding assistant.


Note

Low Risk
Low risk: build configuration-only change that reduces debug info in dev builds and may only affect stepping/variable inspection in debuggers.

Overview
Adjusts Rust dev build settings by adding [profile.dev] debug = 1 in Cargo.toml, reducing the amount of generated debug symbols (and typically target/ size) while keeping file/line backtrace information.

Reviewed by Cursor Bugbot for commit e7f300b. Bugbot is set up for automated code reviews on this repo. Configure here.

Reduces target/ disk usage while keeping backtrace file:line info.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 updates the Cargo.toml file to include a [profile.dev] section with a reduced debug level. Feedback suggests improving the clarity of the configuration by using the named value "line-tables-only" instead of the numeric level 1 and recommends grouping this new section with other profile definitions for better organization.

Comment thread Cargo.toml
Comment on lines +97 to +98
[profile.dev]
debug = 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For better maintainability and clarity, consider the following improvements:

  1. Organization: Group this [profile.dev] section with other profile definitions, such as [profile.serious] (line 87), to keep the configuration organized.
  2. Readability: Use the named value "line-tables-only" instead of the numeric 1. It is more explicit and easier to understand for developers who may not be familiar with Cargo's numeric debug levels.

Note that while this change reduces disk usage, it will limit the ability to inspect local variables in a debugger. If you wish to preserve full debugging for the local crate while still saving space, you could use package-specific overrides for dependencies (e.g., [profile.dev.package."*"]).

Suggested change
[profile.dev]
debug = 1
[profile.dev]
debug = "line-tables-only"

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 3, 2026

Greptile Summary

Sets debug = 1 in the [profile.dev] Cargo profile, switching from full DWARF (level 2, the default) to line-tables-only. This reduces target/ size and link time while keeping file:line resolution in panics and RUST_BACKTRACE output; only interactive debugger variable inspection is affected.

Confidence Score: 5/5

Safe to merge — single-line config change with no functional impact on tests or backtraces.

The change is a well-understood Rust build tuning option. debug = 1 is a valid, documented value; it does not affect correctness, test execution, or backtrace quality. No code logic is touched.

No files require special attention.

Important Files Changed

Filename Overview
Cargo.toml Adds [profile.dev] debug = 1 to reduce DWARF debug info verbosity and shrink target/ disk usage; line-table info for backtraces is preserved.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[cargo build / cargo test] --> B{Profile?}
    B -- dev --> C[profile.dev]
    B -- release --> D[profile.release]
    C --> E["debug = 1 (line tables only)\nPreviously: debug = 2 (full DWARF)"]
    E --> F[Smaller target/ directory\nFaster linking]
    E --> G[Backtraces: file:line ✅\nDebugger variable inspection: ❌]
    D --> H[Unchanged release profile]
Loading

Reviews (1): Last reviewed commit: "chore: set dev profile debug to 1" | Re-trigger Greptile

@jdx jdx enabled auto-merge (squash) May 3, 2026 16:38
@jdx jdx merged commit b044910 into main May 3, 2026
24 checks passed
@jdx jdx deleted the chore/profile-dev-debug-1 branch May 3, 2026 16:49
@jdx jdx mentioned this pull request May 3, 2026
jdx added a commit that referenced this pull request May 5, 2026
### 🚀 Features

- **(builtins)** add `buildifier` format and lint built-ins by
[@plx](https://github.com/plx) in
[#896](#896)

### 🐛 Bug Fixes

- **(step)** only auto-batch when rendered command exceeds ARG_MAX by
[@jdx](https://github.com/jdx) in
[#901](#901)

### 📚 Documentation

- thank Namespace for GitHub Actions runner support by
[@jdx](https://github.com/jdx) in
[#895](#895)

### 🔍 Other Changes

- **(ci)** use !cancelled() instead of always() for final job by
[@jdx](https://github.com/jdx) in
[#906](#906)
- **(docs)** remove shrill.en.dev analytics script by
[@jdx](https://github.com/jdx) in
[#903](#903)
- remove rust-cache from release jobs by [@jdx](https://github.com/jdx)
in [#893](#893)
- invert CLAUDE.md/AGENTS.md so AGENTS.md is canonical by
[@jdx](https://github.com/jdx) in
[#905](#905)
- set dev profile debug to 1 by [@jdx](https://github.com/jdx) in
[#907](#907)

### 📦️ Dependency Updates

- update anthropics/claude-code-action digest to fefa07e by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#897](#897)
- update jdx/mise-action digest to 1648a78 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#898](#898)
- update apple-actions/import-codesign-certs action to v7 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#900](#900)
- update autofix-ci/action action to v1.3.4 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#899](#899)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#908](#908)

### New Contributors

- @plx made their first contribution in
[#896](#896)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping: primarily version string updates across
manifests and docs with no functional code changes in this diff.
> 
> **Overview**
> Updates the project for the `v1.45.0` release by bumping the crate/CLI
version (`Cargo.toml`, `Cargo.lock`, `hk.usage.kdl`, generated CLI docs)
and adding the `1.45.0` entry to `CHANGELOG.md`.
> 
> Refreshes documentation and example configs to reference the new
versioned Pkl package URLs (`docs/*.md`, `docs/public/*.pkl`,
`hk-example.pkl`).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
cfe2da5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: mise-en-dev <[email protected]>
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