Skip to content

Optimize development builds by default - #27562

Open
charliermarsh wants to merge 7 commits into
mainfrom
charlie/ci-cargo-profile
Open

Optimize development builds by default#27562
charliermarsh wants to merge 7 commits into
mainfrom
charlie/ci-cargo-profile

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

Make opt-level = 1, debug = "line-tables-only", and lto = "off" the default development settings. This makes ordinary Cargo commands match our existing agent workflow, avoids local ThinLTO, and removes repeated profile overrides from AGENTS.md.

Preserve existing unoptimized CI behavior by explicitly setting CARGO_PROFILE_DEV_OPT_LEVEL=0 and CARGO_PROFILE_DEV_LTO=false in the affected workflows, including documentation generation, playground validation, typeshed synchronization, typing conformance, and daily fuzzing. Existing CI commands, cache configuration, and cache producers remain unchanged. Release and profiling settings are unaffected.

This follows the discussion in #27526 (comment).

@astral-sh-bot

astral-sh-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh
charliermarsh force-pushed the charlie/ci-cargo-profile branch from 783a4c4 to 5ffbe99 Compare August 7, 2026 00:23
@charliermarsh
charliermarsh force-pushed the charlie/ci-cargo-profile branch from 3dc8d88 to 3cc40d9 Compare August 7, 2026 12:35
@astral-sh-bot

astral-sh-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 96.96%. The percentage of expected errors that received a diagnostic held steady at 92.96%. The number of fully passing files held steady at 106/133.

@charliermarsh charliermarsh changed the title Use a dedicated Cargo profile for CI Optimize development builds by default Aug 7, 2026
@charliermarsh
charliermarsh marked this pull request as ready for review August 7, 2026 15:12
@charliermarsh charliermarsh added the internal An internal refactor or improvement label Aug 7, 2026
@charliermarsh
charliermarsh requested a review from dcreager August 7, 2026 15:13
Comment thread .github/workflows/ci.yaml
Comment on lines +22 to +23
CARGO_PROFILE_DEV_LTO: "false"
CARGO_PROFILE_DEV_OPT_LEVEL: 0

@MichaReiser MichaReiser Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm. How do we make sure we don't forget to add these to other new workflows? Should we have a CI profile? Is there a way that cargo can automatically pick up a profile based on the presence of an env variable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could have a CI profile but we'd then have to thread it through to all jobs (there's no environment variable at present), and it turns out some jobs don't allow you to configure the profile (e.g., cargo publish --dry-run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants