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

Would you consider linktime registration of collections #300

Open
ModProg opened this issue May 15, 2023 · 1 comment
Open

Would you consider linktime registration of collections #300

ModProg opened this issue May 15, 2023 · 1 comment

Comments

@ModProg
Copy link
Collaborator

ModProg commented May 15, 2023

I just found https://github.com/dtolnay/linkme and thought that this might allow collections to register themselves at a schema instead of the other way round. (e.g. the derive macro could do this) if no outright support, maybe a way to specify a [fn(&mut Schematic) -> Result] that define_collections would iterate over and execute.

Just an idea, currently don't really have any projects of the scale where it would be beneficial to register collections distributedly.

(though I did forget to register views or collections from time to time, so in the case of a full integration that would have saved me the headache of not understanding why my code not working) :D

@ecton
Copy link
Member

ecton commented May 16, 2023

Yes, but not as the default path due to some of the open issues (e.g., 61, 49). It seems like tracking down some of the issues from that could be tricky from an end-user's perspective.

I would also think that this could be used to register Views in their respective collections too.

The last complicating factor is that collections can be used in multiple schemas.

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

2 participants