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

Treat warnings as errors on release mode #1629

Merged
merged 10 commits into from
Dec 19, 2021
Merged

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Dec 18, 2021

  • Treat warnings as errors on release mode by default
  • Remove DART_TREAT_WARNINGS_AS_ERRORS option
  • Fix compile warnings with GCC 11.2

Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@jslee02 jslee02 force-pushed the remove_treat_warnings_as_errors branch from aec144c to bba2391 Compare December 18, 2021 07:43
@jslee02 jslee02 added this to the DART 6.13.0 milestone Dec 18, 2021
@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #1629 (ce2d84e) into main (3e0edda) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1629   +/-   ##
=======================================
  Coverage   58.92%   58.92%           
=======================================
  Files         477      477           
  Lines       40192    40192           
=======================================
  Hits        23685    23685           
  Misses      16507    16507           
Impacted Files Coverage Δ
dart/collision/dart/DARTCollide.cpp 45.53% <ø> (ø)
python/dartpy/eigen_geometry_pybind.cpp 41.76% <ø> (ø)

@jslee02 jslee02 force-pushed the remove_treat_warnings_as_errors branch from bba2391 to 81cc116 Compare December 18, 2021 15:09
@jslee02 jslee02 force-pushed the remove_treat_warnings_as_errors branch from 33d0f59 to 8896d7f Compare December 18, 2021 16:35
@jslee02 jslee02 marked this pull request as ready for review December 18, 2021 16:40
@jslee02 jslee02 merged commit bcf32fe into main Dec 19, 2021
@jslee02 jslee02 deleted the remove_treat_warnings_as_errors branch December 19, 2021 03:00
@traversaro
Copy link
Contributor

traversaro commented Dec 19, 2021

Just FYI, probably the "Treat warnings as errors on release mode" will need to be patched out in the version used in package managers of DART, as it is quite common that an older version of DART needs to be compiled with newer compilers, and this creates new warnings, that if use of -Werror is forced result in errors.

See also slide 43 of https://raw.githubusercontent.com/CppCon/CppCon2018/master/Presentations/dont_package_your_libraries_write_packagable_libraries/dont_package_your_libraries_write_packagable_libraries__robert_schumacher__cppcon_2018.pdf .

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2021

@traversaro This makes sense to me. The motivation of this change was to prevent the case that the contributor and the CI don't fix the warnings by forgetting turnning on DART_TREAT_WARNINGS_AS_ERRORS option at least on release mode build. I think this option would be still useful as it gives options to the pacakge managers. Let me revive the option and make sure the CI to turn on the options instead. Thanks for the feedback!

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