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

Use HIDE_SYMBOLS_BY_DEFAULT, fix MovingWindowFilter #566

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Nov 3, 2023

🦟 Bug fix

As part of the works of defining hidden by default in gazebosim/gz-cmake#392, this PR moves the whole MovingWindowFilter class to be header only. Reason for this is that GCC on Jammy seems buggy to me (clang11 on Jammy worked fine, also clang on Mac and MSVC on Windows deal with it just fine) when it needs to generate the symbols needed for the specialization of the class done for <gz::math::Vector3i>. See efforts in #565.

Summary

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #566 (c94ebba) into main (beac11e) will not change coverage.
The diff coverage is 100.00%.

❗ Current head c94ebba differs from pull request most recent head 17970d7. Consider uploading reports for the commit 17970d7 to get more accurate results

@@           Coverage Diff           @@
##             main     #566   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         143      142    -1     
  Lines        9826     9826           
=======================================
  Hits         9451     9451           
  Misses        375      375           
Files Coverage Δ
include/gz/math/MovingWindowFilter.hh 100.00% <100.00%> (ø)

@azeey
Copy link
Contributor

azeey commented Nov 3, 2023

Since gz-cmake already has HIDDEN_SYMBOLS_BY_DEFAULT, maybe we should use that in all the libraries first, make sure all CI passes and then merge gazebosim/gz-cmake#392. Thoughts?

@scpeters
Copy link
Member

scpeters commented Nov 4, 2023

Since gz-cmake already has HIDDEN_SYMBOLS_BY_DEFAULT, maybe we should use that in all the libraries first, make sure all CI passes and then merge gazebosim/gz-cmake#392. Thoughts?

this sounds like you are suggesting the following:

  1. Pass HIDE_SYMBOLS_BY_DEFAULT to the gz_configure_build calls in every gz-* package
  2. Test and verify that CI / nightly builds are happy
  3. Remove HIDE_SYMBOLS_BY_DEFAULT from the gz_configure_build calls in every gz-* package
  4. Merge Use visibility hidden by default gz-cmake#392

If we merge gazebosim/gz-cmake#392 before removing the HIDE_SYMBOLS_BY_DEFAULT parameters, I think it may introduce cmake deprecation warnings. I guess if we split out the deprecation of HIDE_SYMBOLS_BY_DEFAULT, then we could do things in a slightly different order, but it would require an extra gz-cmake pull request

@scpeters
Copy link
Member

scpeters commented Nov 4, 2023

Since gz-cmake already has HIDDEN_SYMBOLS_BY_DEFAULT, maybe we should use that in all the libraries first, make sure all CI passes and then merge gazebosim/gz-cmake#392. Thoughts?

this sounds like you are suggesting the following:

  1. Pass HIDE_SYMBOLS_BY_DEFAULT to the gz_configure_build calls in every gz-* package
  2. Test and verify that CI / nightly builds are happy
  3. Remove HIDE_SYMBOLS_BY_DEFAULT from the gz_configure_build calls in every gz-* package
  4. Merge Use visibility hidden by default gz-cmake#392

If we merge gazebosim/gz-cmake#392 before removing the HIDE_SYMBOLS_BY_DEFAULT parameters, I think it may introduce cmake deprecation warnings. I guess if we split out the deprecation of HIDE_SYMBOLS_BY_DEFAULT, then we could do things in a slightly different order, but it would require an extra gz-cmake pull request

it sounds a little like overkill, but I think it would be the most thorough approach since it would run CI on every single package

@azeey
Copy link
Contributor

azeey commented Nov 6, 2023

it sounds a little like overkill, but I think it would be the most thorough approach since it would run CI on every single package

Maybe a little overkill, but my gut feeling is that it won't be straightforward to get all the packages to build and test properly with symbols hidden by default, so I'd like CI to run on the PRs rather than just local testing. If we can do that without using the HIDE_SYMBOLS_BY_DEFAULT approach, I'm all for it.

@scpeters
Copy link
Member

scpeters commented Nov 6, 2023

it sounds a little like overkill, but I think it would be the most thorough approach since it would run CI on every single package

Maybe a little overkill, but my gut feeling is that it won't be straightforward to get all the packages to build and test properly with symbols hidden by default, so I'd like CI to run on the PRs rather than just local testing. If we can do that without using the HIDE_SYMBOLS_BY_DEFAULT approach, I'm all for it.

I opened gazebosim/gz-utils#115 for example. I think it will take some additional development from our infrastructure team to support testing all packages from source on Ubuntu in CI

Part of testing gazebosim/gz-cmake#392

Signed-off-by: Steve Peters <[email protected]>

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters mentioned this pull request Nov 6, 2023
9 tasks
}
}

template class MovingWindowFilter<int>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need these if it's a header-only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I don't think so. 56f145f

…' into jrivero/visibility_fixes_linux_single_header
@scpeters
Copy link
Member

scpeters commented Nov 6, 2023

I opened #567 to set HIDE_SYMBOLS_BY_DEFAULT confirmed that CI fails, then I merged the changes into this PR

Signed-off-by: Jose Luis Rivero <[email protected]>
@azeey
Copy link
Contributor

azeey commented Nov 7, 2023

@j-rivero Looks like there are two homebrew jobs? And both of them are failing trying to install either gz-math or ign-math8, neither of which are available.

image

@scpeters
Copy link
Member

scpeters commented Nov 7, 2023

@j-rivero Looks like there are two homebrew jobs? And both of them are failing trying to install either gz-math or ign-math8, neither of which are available.

image

I think it's due to gazebo-tooling/release-tools#1054

Signed-off-by: Steve Peters <[email protected]>

Signed-off-by: Steve Peters <[email protected]>
@scpeters
Copy link
Member

scpeters commented Nov 7, 2023

@j-rivero Looks like there are two homebrew jobs? And both of them are failing trying to install either gz-math or ign-math8, neither of which are available.

image

I pushed a whitespace change (17970d7) in order to re-run CI, and it's happy now

@scpeters
Copy link
Member

scpeters commented Nov 7, 2023

I'll wait for @azeey to approve

@scpeters scpeters changed the title Change MovingWindowFilter to be a header only class Use HIDE_SYMBOLS_BY_DEFAULT, fix MovingWindowFilter Nov 8, 2023
@scpeters scpeters merged commit ba26674 into main Nov 8, 2023
11 checks passed
@scpeters scpeters deleted the jrivero/visibility_fixes_linux_single_header branch November 8, 2023 03:00
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