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

re_format: custom formatters need to be defined and registered from other crates #1775

Open
Tracked by #1899
teh-cmc opened this issue Apr 5, 2023 · 0 comments
Open
Tracked by #1899
Labels
🏹 arrow concerning arrow

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Apr 5, 2023

Registering custom formatters should be done from other crates:

  • A) Because re_format cannot depend on other crates (cyclic deps)
  • B) Because how to deserialize and inspect some type is a private implementation detail of that type, re_format shouldn't know how to deserialize and format a TUID for example...

The problem is: when to register?
We need those custom formatters to be available at all time: examples, binaries, tests, benchmarks... we can't manually handle the registration for every permutation.

Ideally, we want to do the registration statically, which is tricky.
There are some options though, e.g.:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏹 arrow concerning arrow
Projects
None yet
Development

No branches or pull requests

1 participant