Skip to content

fix(studio): the design gallery is in debug builds only - #48

Open
aaltshuler wants to merge 1 commit into
mainfrom
fix/gallery-debug-only
Open

aaltshuler wants to merge 1 commit into
mainfrom
fix/gallery-debug-only

Conversation

@aaltshuler

Copy link
Copy Markdown
Contributor

Part of the plan to cut Studio's bloat. The design gallery is a tool for working on Studio, yet a release build offers it in the command palette.

It now compiles only into debug builds. I used cfg(debug_assertions) rather than a Cargo feature because CI passes no features, so feature-gated code would stop being compiled and checked. The action stays defined and stays in PALETTE_ONLY; a release build's palette lists only available actions, so it doesn't appear. A saved gallery tab is skipped on restore in a release build.

Test

  • cargo clippy -p studio --all-targets -- -D warnings
  • The same with --config 'profile.dev.package.studio.debug-assertions=false', which compiles Studio the way a release does without rebuilding its dependencies. I didn't run a full release build, because this machine has no CMake
  • cargo test -p studio, cargo fmt --all --check, check-design-tokens.py, check-brand.py

🤖 Generated with Claude Code

It is for working on Studio, but a release build offers it in the
palette as a tab beside the person's data. `cfg(debug_assertions)`, not
a feature: CI passes no features, so a feature's code would stop being
compiled. The action stays defined, and a release build's palette lists
only available actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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