-
Notifications
You must be signed in to change notification settings - Fork 1
Handle optional field types #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexcrocha
merged 1 commit into
ar-rust-rbs-build
from
12-11-handle_optional_field_types
Dec 16, 2025
Merged
Handle optional field types #71
alexcrocha
merged 1 commit into
ar-rust-rbs-build
from
12-11-handle_optional_field_types
Dec 16, 2025
+73
−101
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9f9a5f6 to
617d70a
Compare
8718771 to
b8eeab8
Compare
Base automatically changed from
12-08-annotate_nullable_pointer_fields_in_config.yml_with_optional_true
to
ar-rust-rbs-build
December 15, 2025 18:36
b8eeab8 to
2b0936c
Compare
Merged
vinistock
approved these changes
Dec 16, 2025
st0012
approved these changes
Dec 16, 2025
2b0936c to
0934030
Compare
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Read `optional: true` annotations from `config.yml` and generate `Option<T>` return types with null checks, so we don't crash at runtime. The extracted helper function centralizes the accessor generation logic for pointer-based field types.
alexcrocha
added a commit
that referenced
this pull request
Jan 13, 2026
Read `optional: true` annotations from `config.yml` and generate `Option<T>` return types with null checks, so we don't crash at runtime. The extracted helper function centralizes the accessor generation logic for pointer-based field types.
alexcrocha
added a commit
that referenced
this pull request
Jan 14, 2026
Read `optional: true` annotations from `config.yml` and generate `Option<T>` return types with null checks, so we don't crash at runtime. The extracted helper function centralizes the accessor generation logic for pointer-based field types.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Now that we have
optional: trueannotations inconfig.yml, we can leverage them to check if fields are optional.This PR updates the codegen to read those annotations and generate
Option<T>return types with null checks, so we don't crash at runtime.Also refactored the accessor generation to reduce duplication by extracting a helper function for the common pattern.
This enables implementing correct AST visitor traversal in a follow-up PR.