-
Notifications
You must be signed in to change notification settings - Fork 385
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
arrow2-convert
migration 4: support serde-based types in codegen
#3902
Conversation
507b862
to
bb4da17
Compare
53700bf
to
d821641
Compare
d821641
to
0b54344
Compare
… out dependencies (#3897) This introduces the `rust.attr.override_crate` attribute, which is necessary for the serde-codegen story. This attribute also allows us to generate some fundamental types such as `InstanceKey` directly into `re_types_core` rather than `re_types`, making it possible to reduce the number of crates that depend on the giant `re_types`. - The `AutoSpaceViews` & `PanelView` components are now back into their respective home (`re_viewport` & `re_viewer`, respectively). They were temporarily moved it because we had no support for `custom_crate`. They will be joined by their more complicated siblings in the next PR, which implements the necessary serde-codegen support. - `InstanceKey`, `Clear` and `ClearIsRecursive` are now generated into `re_types_core`. This allows `re_query`, `re_arrow_store` and `re_data_store` to drop their dependency on `re_types`. - Generated code now picks up arrow from `re_types_core::external` instead of importing it directly. This means crates hosting generated code are not forced into import `arrow2` directly. --- `arrow2-convert` migration PR series: - #3853 - #3855 - #3897 - #3902
0b54344
to
ad9c851
Compare
) | ||
.boxed() | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated code is not very readable :/ is there some low-hanging fruit that can help?
Maybe:
- Some more
use
statements at the top - More
let
bindings - Add some comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some include clean up. Everything else will have to be refactored pretty soon to drop arrow2
anyway.
The end of our wonderful journey. - `NumInstances` control column now has an actual dedicated component type. - `EntityPath` is now a component. - `Into<Cow<Self>>` impls have been cleaned up to generate way less code. - `arrow2_convert` is fully gone. --- `arrow2-convert` migration PR series: - #3853 - #3855 - #3897 - #3902 - #3917
This introduces the
rust.attr.serde_type
attribute, allowing you to use anyserde
-compatible Rust types in our IDL.This unblocks further blueprint experimentations, and is the last blocker to sunset
arrow2-convert
.SpaceViewComponent
,SpaceViewMaximized
&ViewportLayout
are now all implemented that way.re_viewport
is now free ofarrow2-convert
.arrow2-convert
migration PR series:arrow2-convert
migration 1:TUID
,RowId
,TableId
#3853arrow2-convert
migration 2: non-serde blueprint types #3855arrow2-convert
migration 3:attr.rust.override_crate
& optimizing out dependencies #3897arrow2-convert
migration 4: support serde-based types in codegen #3902arrow2-convert
migration 5: sunsetarrow2-convert
#3917Checklist