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

Require descriptors to be provided on all log calls in C++ (either explicitly or implicitly via archetype) #8853

Merged
merged 10 commits into from
Jan 30, 2025

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jan 29, 2025

Related

What

Followed the Rust example and opted out of deprecating this, instead making it a breaking change.
Iterated on the migration guide & adjusted snippets.

  • pass main ci

Copy link

github-actions bot commented Jan 29, 2025

Latest documentation preview deployed successfully.

Result Commit Link
e40d5af https://landing-5k434j5yg-rerun.vercel.app/docs

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

@teh-cmc teh-cmc self-requested a review January 30, 2025 08:38
@teh-cmc teh-cmc force-pushed the andreas/cpp/avoid-unttaged branch from 233ddcd to b4bede8 Compare January 30, 2025 08:56
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That predates this PR, but I'm not a fan of the fact that the most basic constructor allows not specifying required components now 😕.

That means there is no codepath left that pushes the user towards the sensible default, compared to e.g. in Rust where new() still enforces requirements.

For example, colors of a point cloud can be logged without position data:

```cpp
rec.log("points", rerun::Points3D().with_colors(colors));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm.. I don't like pushing people towards this ("this" being an implicit partial update, as opposed to rerun::Points3D::update_fields()). If somehow executes that thing, they will end up in a very confusing situation where the viewer displays nothing...

@Wumpf
Copy link
Member Author

Wumpf commented Jan 30, 2025

@rerun-bot full-check

Copy link

Started a full build: https://github.com/rerun-io/rerun/actions/runs/13049115241

@Wumpf
Copy link
Member Author

Wumpf commented Jan 30, 2025

that's a valid concern, let's talk about pro/con & solutions before shipping this. But at that point we need to do that as iteration anyways, so merging this as-is

@Wumpf Wumpf merged commit 306f7df into main Jan 30, 2025
67 of 68 checks passed
@Wumpf Wumpf deleted the andreas/cpp/avoid-unttaged branch January 30, 2025 09:58
@Wumpf Wumpf changed the title Require descriptors to be provided on all log calls in C++ (either explicitely or implicitely via archetype) Require descriptors to be provided on all log calls in C++ (either explicitly or implicitly via archetype) Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce usage of tagged logging APIs: C++
2 participants