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

Introduce a createBuffers macro for the jinja template #480

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

hegner
Copy link
Collaborator

@hegner hegner commented Sep 12, 2023

BEGINRELEASENOTES

  • Move the code generation of buffers into the 'create_buffers' macro

ENDRELEASENOTES

This extracts the create_buffers change from #472 as discussed in there.

Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it here in isolation, I would have a few minor comments. However, they will be potentially be slightly annoying in updating #472 if we address them.

{%- endmacro %}
{% endmacro %}

{% macro createBuffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, schemaVersion) %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% macro createBuffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, schemaVersion) %}
{% macro create_buffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, schemaVersion) %}

consistency with other macros (and the release notes).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, schemaVersion is currently unused (it will get it's usage in #472 though).


return readBuffers;
}
{{ macros.createBuffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, 1) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ macros.createBuffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, 1) }}
{{ macros.create_buffers(class, package_name, collection_type, OneToManyRelations, OneToOneRelations, VectorMembers, 1) }}

@hegner
Copy link
Collaborator Author

hegner commented Sep 13, 2023

@tmadlener - I think we apply those changes directly after merging the schema evolution one. Would that be fine with you?

@tmadlener tmadlener changed the title Create buffers macro Introduce a createBuffers macro for the jinja template Sep 13, 2023
@tmadlener tmadlener merged commit 06eae8e into master Sep 13, 2023
17 checks passed
@hegner hegner deleted the create-buffers-macro branch September 15, 2023 08:09
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Sep 26, 2023
* move Collection::createBuffers template into macro

---------

Co-authored-by: tmadlener <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants