-
Notifications
You must be signed in to change notification settings - Fork 60
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
Decouple the collection buffer creation from the collection #394
Conversation
488490c
to
bf82aba
Compare
Updated the docstring for the |
@tmadlener - did you see the cling error of the IBs before? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. To me it looks fine.
There is only a nitpicking one about underscore vs camel case for variable names. But that we should discuss for coding conventions anyhow.
BEGINRELEASENOTES
CollectionBufferFactory
that can create the necessary buffers from a collection type, a schema version and a subset collection flag.createBuffers
andcreateSchemaEvolvableBuffers
frompodio::CollectionBase
interfaceschema_version
1 in the yaml definition files. Default to 1 if noschema_version
is providedschemaVersion
to theDatamodelDefinition.h
header that is generated and that can be accessed via{{ package_name }}::meta::schemaVersion
. Use this to propagate schema information to the necessary places.SIOBlocks
write the current schema version, such that on reading they can generate the appropriate buffers for the version on file.ENDRELEASENOTES
This PR continues the cleanup of internals and the introduction of full schema evolution capabilities. The most important bit is that it completely disentangles the buffer creation from the collection interface, so that it is now possible to create buffers without having to create a collection first. This is achieved via a
CollectionBufferFactory
(singleton) that is populated during datamodel library loading. The rest of this PR is mainly shuffling some parts of existing code around and removing some other bits that were previously necessary to "steal" the buffers from the collection they were created from.This does not yet address any schema evolution concerns other than providing the possibility to generate different buffers for different schema versions and the basics for populating the factory with versioned creation function. For actual schema evolution functionality this has to be populated accordingly (either by users or via automatic code generation).
@hegner this introduces an other de-facto registry, but I don't see an easy way around that. We could hide the fact that it is a singleton registry behind an interface of global functions if we wanted to.
This should solve the issue that is currently blocking #257.
TODO: