GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — No alloc Unicode version by joshuamegnauth54 · Pull Request #9820 · RustPython/RustPython Conversation
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Build-time version extraction crates/unicode/build.rs |
The build script validates the version from the first line of NameAliases.txt and emits it as UNICODE_VERSION. It runs this parser alongside the block parser in small_parsers. |
Unicode version constants and accessors crates/unicode/src/data.rs, crates/unicode/src/lib.rs |
The Unicode library defines and re-exports UNICODE_VERSION and UNICODE_VERSION_LEGACY. Ucd::unidata_version() returns the applicable constant. The version test checks the modern constant, and the former unicode_version() function is removed. |
Standard-library version values crates/stdlib/src/unicodedata.rs |
Ucd::new initializes its version from the modern or legacy constant. The module-level unidata_version returns UNICODE_VERSION. CString construction panics if the selected value contains an internal NUL. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Possibly related PRs
generate_blocks parser, which this PR moves into small_parsers and schedules there.Suggested reviewers: youknowone, youknowdot
f6631The change moves Unicode version extraction to build time and removes a per-call allocation and parse. No actionable merge-blocking risk was identified in the supplied changes.
Explanation
The title "No alloc Unicode version" matches the main change. The PR moves the NameAliases version parsing to build.rs and embeds the version as the compile-time constants UNICODE_VERSION and UNICODE_VERSION_LEGACY, so unicode_version() no longer parses the text file or allocates at runtime. The title is short and specific. It does not name the build-time change, but it points to the core purpose, and a teammate scanning history would understand the primary change.
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.
97f1b1a8-34d1-4f02-9d6e-3d96c0865e10crates/stdlib/src/unicodedata.rscrates/unicode/build.rscrates/unicode/src/data.rscrates/unicode/src/lib.rsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Simple patch that moves the NameAliases version parser to build.rs. This avoids embedding the text file just to parse the file line each time unicode_version() is called. I also fixed version_owner to allocate less by not constructing a temporary String to turn into a CString.
f6631da to
419664d
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.