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

Remove the need for [External] and typedef UDL definitions #2302

Open
bendk opened this issue Nov 9, 2024 · 0 comments
Open

Remove the need for [External] and typedef UDL definitions #2302

bendk opened this issue Nov 9, 2024 · 0 comments

Comments

@bendk
Copy link
Contributor

bendk commented Nov 9, 2024

We currently need these for a few reasons and I'm hoping to make them all obsolete.

  • To know which UniffiTag system to use. This won't be necessary after Make UniffiTag consistent for UDL and procmacros #1865.
  • To specify the bridge type for custom types. This is no longer needed now that New custom type system #2150 is merged.
  • To know the FFI type when lowering. However, this can be determined using the proc-macro metadata and we're already translating all UDL definitions to proc-macro invocations.
  • To fill in required fields for the uniffi_meta types. We can avoid this by making uniffi_udl generate its own types, rather than the uniffi_meta types. We don't need to all of that data, we just need to enough to generate the proc-macro calls. One side benefit of this is that we could remove fields in uniffi_meta that only exist to support uniffi_udl (example)

The only downside I can see is that maybe the error messages will get worse if you misspell a type. I'm not too worried about this since I'm more and more convinced we should be pushing users away from UDL anyways.

bendk added a commit to bendk/uniffi-rs that referenced this issue Nov 9, 2024
This wasn't released in 0.28.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant