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

Deprecate legacy Points{2|3}D #2790

Closed
2 tasks done
Tracked by #2789
teh-cmc opened this issue Jul 24, 2023 · 1 comment · Fixed by #2768
Closed
2 tasks done
Tracked by #2789

Deprecate legacy Points{2|3}D #2790

teh-cmc opened this issue Jul 24, 2023 · 1 comment · Fixed by #2768
Labels
🏹 arrow concerning arrow codegen/idl 📺 re_viewer affects re_viewer itself

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Jul 24, 2023

  • Clean up re_components
  • Port viewer to use new types and queries
@teh-cmc teh-cmc changed the title Remove old components Deprecate legacy Points{2|3}D Jul 24, 2023
@teh-cmc teh-cmc added 🏹 arrow concerning arrow 📺 re_viewer affects re_viewer itself codegen/idl labels Jul 24, 2023
@jleibs
Copy link
Member

jleibs commented Jul 24, 2023

Hold off on this until we cut the 0.8 release.

Wumpf pushed a commit that referenced this issue Jul 28, 2023
The `points2d` and `points3d` views are now both implemented in terms of
the new components (that was already the case for points2d).

---

This PR removes all of these:
- `DrawOrder`
- `Point2D`
- `Point3D`
- `Radius`
- `InstanceKey`

and deprecates all of those:
- `Color`
- `Label`
- `ClassId`
- `KeypointId`

The reason these last four are merely deprecated rather than removed
entirely is that the legacy `AnnotationContext` depends on them, and
more specifically depends on their respective implementations of
`arrow2-convert`'s traits.
Still, they have been confined into tight corners as much as possible.

The deprecated type are prefixed with `Legacy`, e.g. `LegacyLabel`.
In particular, `ColorRGBA` is now `LegacyColor`.

In Rust, the new components aren't hidden behind an `experimental`
module anymore, instead they are transparently merged with the rest of
the components.

---

The _new_ `Point2D` component implements the _old_ `LegacyComponent`
trait to allow all of the old `re_query` test suites to continue
working, until we remove them all soon.

---

The legacy point logging APIs, `log_point` & `log_points`, have been
rewritten in terms of the `Points2D` & `Points3D` archetypes.

In order to do so, I had to make their `position` argument mandatory,
i.e. you can _not_ write this anymore: `rr.log_points("a/b/c",
colors=[red, red, blue])`.
This is _not_ a problem for two reasons:
1. This won't ever see the light of release anyway, since this PR marks
the cutoff point of 0.8, and this code must be removed in order to
release 0.9 (assuming 0.9 is the release of HOPE).
2. This [never worked to begin
with](https://github.com/rerun-io/rerun/blob/main/rerun_py/rerun_sdk/rerun/log/points.py#L225-L226),
so we know for a fact that no one ever relied on that behavior anyhow.

---

cc @Wumpf, the [custom view
example](https://github.com/rerun-io/rerun/pull/2768/files#diff-a0e8c8b731114ee9364c99840046c1aeea03fd2ea92479fc139bd81202db1da0)
got a bit more verbose and should get much much better once we tackle
#2778. We could also just modify it to use an existing archetype instead
(which would have to be either `Points2D` or `Points3D` at the moment).


---


Fixes #2790 

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2768) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2768)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Fgoodbye_old_point/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Fgoodbye_old_point/examples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏹 arrow concerning arrow codegen/idl 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants