Skip to content
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

Autogenerate tagging-compliant descriptor methods for all archetypes #8643

Open
wants to merge 2 commits into
base: cmc/eager_partial_0_new_traits
Choose a base branch
from

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Jan 10, 2025

Generate methods for all archetypes that allow retrieving the fully-qualified descriptor for any of the archetype's field.
E.g. this method returns the descriptor for the radii field of Points3D:

impl Points3D {
    /// Returns the [`ComponentDescriptor`] for [`Self::radii`].
    #[inline]
    pub fn descriptor_radii() -> ComponentDescriptor {
        ComponentDescriptor {
            archetype_name: Some("rerun.archetypes.Points3D".into()),
            component_name: "rerun.components.Radius".into(),
            archetype_field_name: Some("radii".into()),
        }
    }
}

This becomes a must as we start require tags in more and more places (e.g. partial updates APIs).

Copy link

github-actions bot commented Jan 10, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
404b22f https://rerun.io/viewer/pr/8643 +nightly +main

Note: This comment is updated whenever you push a commit.

@teh-cmc teh-cmc added enhancement New feature or request 🦀 Rust API Rust logging API include in changelog 🔩 data model do-not-merge Do not merge this PR labels Jan 10, 2025
@teh-cmc teh-cmc marked this pull request as ready for review January 10, 2025 16:05
@emilk emilk self-requested a review January 10, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/idl do-not-merge Do not merge this PR enhancement New feature or request include in changelog 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants