Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Allow users to opt out of generated code, component database, etc. #83

Open
jamiebrynes7 opened this issue Mar 19, 2019 · 2 comments
Open
Labels
✨ feature New feature or request

Comments

@jamiebrynes7
Copy link
Owner

A feature that has repeatedly come up in PR reviews and discussions has been allowing users to replace the default generated code or opt out entirely and pass in raw Schema objects.

Currently, the implementation assumes that you are using generated code of a specific shape and structure. (i.e. - using the Component trait, using inventory for auto-registration).

We should allow and support for this level of granularity and let users opt in at whichever level they want. From high level to low level:

  1. Use default generated code and associated traits, types, etc.
  2. Custom generated code, but still using the associated traits, types, etc.
  3. Opt out of generated code and associated traits, types, etc. entirely.

Using cargo feature flags may be an appropriate way of handling this - but some decisions will need to be made around which direction these feature flags go (i.e. - default is the low level, and you opt into higher level features or default is high level, and you opt out of the high level features).

This will likely be a big chunk of work to isolate out these parts of the codebase and can likely be done post v0.1.0 release

@jamiebrynes7 jamiebrynes7 added the ✨ feature New feature or request label Mar 19, 2019
@randomPoison
Copy link
Collaborator

randomPoison commented Mar 24, 2019

What's the use case for opting out of the SDK-provided traits for serialization? I get disabling vtable serialization so that they can control when serialization happens, but what value would there be in opting out of the traits entirely?

There's also the question of how this interacts with code generation in dependencies with regards to #56.

@jamiebrynes7
Copy link
Owner Author

Important to note that vtables will be gone as of #146. Custom generated code is still on the table though :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants