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

Rename 'struct bmi' to not conflict with declarations from BMI headers #38

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

PhilMiller
Copy link
Contributor

@PhilMiller PhilMiller commented Jun 11, 2024

In service of NOAA-OWP/ngen#831, I encountered a name conflict between struct bmi here and namespace bmi from the BMI C++ header:

[ 31%] Building CXX object CMakeFiles/sft_pframework.dir/src/main_pseudo_framework.cxx.o
In file included from /home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/main_pseudo_framework.cxx:13:
/home/runner/work/SoilFreezeThaw/SoilFreezeThaw/extern/evapotranspiration/include/pet.h:214:8: error: ‘struct bmi’ redeclared as different kind of entity
  214 | struct bmi
      |        ^~~
In file included from /home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/main_pseudo_framework.cxx:5:
/home/runner/work/SoilFreezeThaw/SoilFreezeThaw/src/../bmi/bmi.hxx:13:11: note: previous declaration ‘namespace bmi { }’
   13 | namespace bmi {
      |           ^~~

We should not have things named simply bmi to avoid conflicts like this.

Changes

  • Rename struct bmi to struct pet_bmi and change the one instance of usage

Testing

  1. CI

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

@PhilMiller
Copy link
Contributor Author

I can't directly add reviewers due too permissions issues, but @aaraney @SnowHydrology @madMatchstick could one of you please approve and merge this? I don't think it will impact anything outside this repo, so no coordination needed.

@hellkite500 hellkite500 merged commit 80c1ab9 into NOAA-OWP:master Jun 11, 2024
4 checks passed
@PhilMiller PhilMiller deleted the PhilMiller/bmi-virtual-dtor branch June 11, 2024 05:45
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