Skip to content

Fix createsubsys script#4187

Merged
pinkenburg merged 4 commits intosPHENIX-Collaboration:masterfrom
pinkenburg:fix-createsubsys-script
Feb 20, 2026
Merged

Fix createsubsys script#4187
pinkenburg merged 4 commits intosPHENIX-Collaboration:masterfrom
pinkenburg:fix-createsubsys-script

Conversation

@pinkenburg
Copy link
Copy Markdown
Contributor

@pinkenburg pinkenburg commented Feb 20, 2026

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work for users)
  • Requiring change in macros repository (Please provide links to the macros pull request in the last section)
  • I am a member of GitHub organization of sPHENIX Collaboration, EIC, or ECCE (contact Chris Pinkenburg to join)

What kind of change does this PR introduce? (Bug fix, feature, ...)

This PR updates the compiler flags in the perl script which create subsysreco/G4 modules. perl scripts are not checked [skip-ci]

TODOs (if applicable)

Links to other PRs in macros and calibration repositories (if applicable)

Fix createsubsys script

Motivation / Context

These Perl scripts (CreateSubsysRecoModule.pl and CreateG4Subsystem.pl) are code generators used by developers to create template modules for new SubsysReco and G4 subsystem modules within the sPHENIX software framework. This PR updates the compiler flags and include handling in the auto-generated build configuration files to align with repository standards and best practices.

Key Changes

  • Enhanced compiler warnings: Both scripts now generate build files with expanded warning flags (-Wall -Wextra -Wshadow -Werror instead of just -Wall -Werror), enabling detection of additional potential issues such as unused variables and variable shadowing.
  • System include path handling: Updated to use -isystem instead of -I for external dependencies (OFFLINE_MAIN/include and ROOTSYS/include), which suppresses compiler warnings originating from system/external headers while maintaining normal warnings for project code.

Potential Risk Areas

  • Compilation strictness: The addition of -Wextra and -Wshadow may cause previously-generated or user-created modules to fail compilation if they contain code triggering these new warnings. Developers regenerating modules or creating new ones should review and resolve any newly-reported warnings.
  • Include path semantics: While -isystem is generally safer (it treats includes as system headers), any edge cases in header search ordering or macro handling between -I and -isystem could theoretically cause differences in behavior for newly-generated code.

Notes

  • These changes only affect newly generated code from these scripts; existing compiled modules are unaffected.
  • Per the PR description, Perl scripts are not checked by CI.
  • Caution: AI-generated analyses of code changes can contain errors; manual review of the generated configure.ac and Makefile.am templates is recommended.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

These changes modify Perl scripts that generate build configurations and C++ code. They introduce stricter compiler warning flags (-Wextra, -Wshadow), apply the [[maybe_unused]] attribute to suppress unused parameter warnings in generated methods, and switch header search paths from -I to -isystem semantics.

Changes

Cohort / File(s) Summary
Generated Build Configuration
offline/framework/fun4all/CreateSubsysRecoModule.pl, simulation/g4simulation/g4detectors/CreateG4Subsystem.pl
Updated CXXFLAGS in generated configure scripts to include -Wextra and -Wshadow alongside existing -Wall and -Werror. Modified Makefile.am generation to use -isystem instead of -I for OFFLINE_MAIN/include and ROOTSYS/include paths, treating these as system headers.
C++ Parameter Annotation
offline/framework/fun4all/CreateSubsysRecoModule.pl
Added [[maybe_unused]] attribute to PHCompositeNode *topNode parameters in generated method implementations (Init, InitRun, process_event, ResetEvent, End, Reset) to suppress compiler warnings for intentionally unused parameters.

Possibly related PRs

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pinkenburg pinkenburg merged commit b776eb1 into sPHENIX-Collaboration:master Feb 20, 2026
2 checks passed
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.

1 participant