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 clash of names with upstream function #1471

Merged
merged 4 commits into from
Apr 14, 2023

Conversation

ischoegl
Copy link
Member

@ischoegl ischoegl commented Apr 1, 2023

HighFive 2.7.0 introduces h5py-style support for booleans, which is close to identical with what was already implemented in Storage.cpp. HighFive uses the exact same name for a new create_enum_boolean function, which clashes with an existing local function in Storage.cpp, causing CI failures when conda packages highfive with versions 2.7.0 and newer are used.

The resolution is to use the full name for older versions of HighFive (2.7.0 and older), while using HighFive's implementation for boolean support for HighFive 2.7.1 and newer (this avoids a change of their API from 2.7.0 to 2.7.1). For the time being, the git submodule remains on 2.6.2, while conda will grab the newest package available.

Other updates:

  • use system installation of HighFive by default and other SCons logic fixes
  • detect and display HighFive version

See BlueBrain/HighFive#713 and BlueBrain/HighFive#724

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #1471 (97a6c11) into main (1f1751b) will increase coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #1471      +/-   ##
==========================================
+ Coverage   70.04%   70.05%   +0.01%     
==========================================
  Files         377      377              
  Lines       57772    57773       +1     
  Branches    19406    19406              
==========================================
+ Hits        40465    40473       +8     
+ Misses      14746    14739       -7     
  Partials     2561     2561              
Impacted Files Coverage Δ
src/base/Storage.cpp 79.48% <80.00%> (+0.05%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ischoegl ischoegl force-pushed the fix-highfive-name-clash branch 18 times, most recently from 123839d to f8e3b1d Compare April 3, 2023 19:29
@ischoegl ischoegl marked this pull request as draft April 3, 2023 23:03
@ischoegl ischoegl force-pushed the fix-highfive-name-clash branch 5 times, most recently from 91b17d8 to 5a8fa90 Compare April 4, 2023 15:25
@ischoegl
Copy link
Member Author

ischoegl commented Apr 4, 2023

While this is ready for a review, I am leaving this in draft mode until HighFive 2.7.1 is released. The current CI failures on windows-2022 are caused by a known issue with conda's highfive package 2.7.0 for MSVC 14.1 that are presumably unrelated to Cantera. Edit: pinned conda’s highfive to older versions.

Update: while HighFive 2.7.1 is released (and is expected to fully resolve all issues), the conda packages aren’t generated/uploaded yet.

@ischoegl ischoegl force-pushed the fix-highfive-name-clash branch 2 times, most recently from 887dac0 to 18051c5 Compare April 4, 2023 21:34
@ischoegl ischoegl marked this pull request as ready for review April 11, 2023 11:03
@ischoegl
Copy link
Member Author

@speth ... as expected, HighFive 2.7.1 conda packages resolve the CI issues (other than #1473, which is separate).

@ischoegl ischoegl requested a review from a team April 11, 2023 11:26
@ischoegl ischoegl mentioned this pull request Apr 11, 2023
5 tasks
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks for finding the solution to this, @ischoegl -- the CI error messages definitely did not make it clear what was going wrong. I had some suggestions that I think will simplify the configuration checks a bit.

SConstruct Outdated Show resolved Hide resolved
SConstruct Outdated Show resolved Hide resolved
SConstruct Outdated Show resolved Hide resolved
src/base/Storage.cpp Outdated Show resolved Hide resolved
@ischoegl ischoegl force-pushed the fix-highfive-name-clash branch 2 times, most recently from dc55fb3 to c910c42 Compare April 11, 2023 17:09
@ischoegl
Copy link
Member Author

ischoegl commented Apr 11, 2023

Thanks for finding the solution to this, @ischoegl -- the CI error messages definitely did not make it clear what was going wrong.

I guess I need to give a shoutout to folks over at the HighFive project, who were extremely helpful and responsive in the debugging effort.

Other than that, I rebased and addressed three of the four suggestions. For the last one, I no longer rewrite the file, but am not sure how to move things out of SConstruct without major overhauls of the scons workflow.

@ischoegl ischoegl requested a review from speth April 11, 2023 17:10
@ischoegl ischoegl force-pushed the fix-highfive-name-clash branch 3 times, most recently from 12d87d8 to 8be1467 Compare April 14, 2023 12:59
@ischoegl
Copy link
Member Author

@speth ... thanks for the suggestion. I believe that everything is taken care of at this point.

I submitted a minor PR #1477 that could be adopted before the version bump, but it's not a major issue (it's mostly about updating annoying formatting for something that I've been working on).

speth
speth previously approved these changes Apr 14, 2023
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl, this looks good to me. Just one small simplification left, I think.

SConstruct Outdated Show resolved Hide resolved
Also use system installation by default.
HighFive 2.7.0 introduces a new create_enum_boolean function, which
clashes with an existing local function in Storage.cpp.
@ischoegl
Copy link
Member Author

@speth ... could you re-approve? (fixing the last item dismissed your approval)

@speth speth merged commit 708a8bf into Cantera:main Apr 14, 2023
@ischoegl ischoegl deleted the fix-highfive-name-clash branch April 14, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants