Skip to content

fix: enable codegen feature for rust-i18n-support in dev-dependencies - #141

Merged
huacnlee merged 4 commits into
longbridge:mainfrom
sunli829:main
May 28, 2026
Merged

huacnlee merged 4 commits into
longbridge:mainfrom
sunli829:main

Conversation

@sunli829

Copy link
Copy Markdown
Contributor

Summary

  • Gates compile-time dependencies (serde, serde_yaml, globwalk, etc.) behind the codegen feature in rust-i18n-support, so downstream crates that don't use load-path no longer compile them unnecessarily.
  • Adds load-path feature documentation to the README.
  • Fixes the CI breakage caused by the above: load_locales is now gated behind codegen, so the integration test that imports it directly needs rust-i18n-support listed in [dev-dependencies] with features = ["codegen"].

Test plan

  • cargo test passes locally
  • CI passes on this PR

🤖 Generated with Claude Code

sunli829 added 4 commits May 27, 2026 17:58
…pport

serde_yaml, toml, globwalk, normpath, itertools, serde_json, and serde
are only needed during code generation (proc-macro / CLI), not at
runtime. Moving them behind an optional `codegen` feature removes them
from the user's final binary by default.

Also removes three unused dependencies from rust-i18n-support
(proc-macro2, regex, lazy_static).

A new `load-path` feature on the root crate re-enables `try_load_locales`
for users who need runtime locale file loading.
`load_locales` was gated behind the `codegen` feature in commit 2a60d99,
breaking the integration test that imports it directly.
@huacnlee
huacnlee merged commit 97cf091 into longbridge:main May 28, 2026
2 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.

2 participants