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

fix: skip non-class definition headers in make_datamodel_glue.py #1706

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

wdconinc
Copy link
Contributor

Briefly, what does this PR introduce?

In recent versions of EDM4hep, deprecated data types are defined as aliases to the recommended new data type: e.g.

namespace edm4hep {
using MCRecoCaloParticleAssociation [[deprecated("use CaloHitMCParticleLink instead")]] =
    edm4hep::CaloHitMCParticleLink;
}

This leads to issues in the datamodel_glue.h header, which defines them as a class, e.g.

/opt/local/include/edm4hep/MCRecoCaloParticleAssociation.h:7:7: error: typedef redefinition with different types ('edm4hep::CaloHitMCParticleLink' vs 'edm4hep::MCRecoCaloParticleAssociation')
    7 | using MCRecoCaloParticleAssociation [[deprecated("use CaloHitMCParticleLink instead")]] =
      |       ^
/home/wdconinc/git/EICrecon/build/include/services/io/podio/datamodel_glue.h:326:11: note: previous definition is here
  326 |     class MCRecoCaloParticleAssociation;
      |           ^

This PR avoids listing using aliases in the datamodel_glue.h headers by only processing data type headers with an actual class definition.

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (support for EDM4hep-0.99)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

@wdconinc wdconinc requested review from a team and simonge and removed request for a team January 15, 2025 18:18
Copy link
Contributor

@simonge simonge left a comment

Choose a reason for hiding this comment

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

Looks good, I can't see any meaningful differences. As long as no one makes aliases between data types where the name of contains the string "class"

@veprbl veprbl added this pull request to the merge queue Jan 17, 2025
Merged via the queue into main with commit c70ecbe Jan 17, 2025
85 of 86 checks passed
@veprbl veprbl deleted the make-less-datamodel-glue branch January 17, 2025 17:59
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.

3 participants