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

Module with multiple #[odra::module] impl block does not compile #13

Closed
kpob opened this issue Jul 22, 2022 · 2 comments
Closed

Module with multiple #[odra::module] impl block does not compile #13

kpob opened this issue Jul 22, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@kpob
Copy link
Contributor

kpob commented Jul 22, 2022

By now the only correct implementation of a module is having a struct and a single implementation block. If for some reason, a developer would like to have a module with more than one implementation block marked as odra::module, compilation will fail.
We need to come up with a solution that gently informs a user that he should put all the entry points in a single impl block or allow having multiple blocks.

@kpob kpob added the bug Something isn't working label Jul 22, 2022
@kpob
Copy link
Contributor Author

kpob commented Jul 22, 2022

I'll go first with a possible solution. The most straightforward approach is to wrap up the whole module with mod, then the macro can process struct and all impl blocks at once.

@kpob
Copy link
Contributor Author

kpob commented Mar 31, 2023

#87 may resolve the issue

@zie1ony zie1ony closed this as completed Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants