Hiding all IPhreeqc symbols by default from our custom static library#424
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #424 +/- ##
=======================================
Coverage 86.45% 86.45%
=======================================
Files 14 14
Lines 1912 1912
Branches 336 336
=======================================
Hits 1653 1653
Misses 210 210
Partials 49 49 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thanks @vineetbansal ; I would never have thought of this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm pretty sure all the segfaults and hanging-up that we're seeing in PR #397 is because the
from pyEQL.phreeqc import PHRQSolhas been moved to the module level, meaning it runs unconditionally.While this in itself should not be a problem at the python level, the fact that we're seeing segfaults means that our C++ extension is clashing with the
Phreeqc's extension - both our library andPhreeqcPythonare making the same symbols available in the python process, and since we differ in our mutual versions ofIPhreeqcthat we depend on, things are getting weird. I'm not sure why this would only happen on a Mac, but that's an operating system nuance that we can take as a given.In other words, both our extension and
PhreeqcPythonare being sloppy in hiding stuff inIPhreeqcthat we haven't provided wrappers for (and should thus remain hidden). This PR fixes that from our end.We could ask Shaun to move the
importwhere it is actually used instead of globally to get around this, but really he (or other python programmers) shouldn't have to worry about this kind of stuff.Some more details are here. This is all conjecture, but this change shouldn't hurt anything, and is good hygiene for us anyway. It will be interesting to see if PR #397 starts to work after these changes are merged.