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

Add support for deprecation notices on Archetypes #4830

Closed
Tracked by #4813
jleibs opened this issue Jan 16, 2024 · 0 comments · Fixed by #5102
Closed
Tracked by #4813

Add support for deprecation notices on Archetypes #4830

jleibs opened this issue Jan 16, 2024 · 0 comments · Fixed by #5102
Labels
codegen/idl enhancement New feature or request

Comments

@jleibs
Copy link
Member

jleibs commented Jan 16, 2024

As we begin to refactor and change some of our Archetypes it will be helpful to go through a 1-release deprecation cycle on things that would otherwise break user API usage.

When an existing archetype is being deprecated we should be able to apply a deprecated attribute to the archetype definition and code-gen deprecation notices for the Archetype constructors across all 3 languages.

In the future we should also be able to deprecate usage of individual component-fields within an archetype, but this will be a bit more involved and not needed immediately.

The deprecated attribute should be a string with a message that can explain to users what to do, such as: "This archetype has been replaced by the new archetypes: Scalar and SeriesStyle"

Python

In python we should follow the pattern established in: https://github.com/rerun-io/rerun/pull/3564/files

  • Add a @deprecated decorator to the class
  • Add information about the deprecation to the generated docstrings.

C++

TODO

Rust

TODO

@jleibs jleibs added enhancement New feature or request codegen/idl labels Jan 16, 2024
Wumpf added a commit that referenced this issue Feb 8, 2024
)

### What

Our codegen can now deprecate archetypes
* Fixes #4830
* Does *not* address #2366
   * builtin attribute is for fields. Unclear if it can have text? 
   * Fixes #2367

### 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 the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5102/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5102/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5102/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5102)
- [Docs
preview](https://rerun.io/preview/b773eee58d95201fc1f16a023183294d739cf2f9/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/b773eee58d95201fc1f16a023183294d739cf2f9/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Jeremy Leibs <jeremy@rerun.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/idl enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant