-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Use the same compiler options for xrpl.libxrpl and all its submodules #5228
Conversation
* Treats warnings as errors so the build will fail, avoiding further problems down the line. * Also include OS and compiler information in the dependencies environment dump.
* Resolves an issue introduced by XRPLF#5111, which inadvertently removed the -Wno-maybe-uninitialized compiler option from those modules. This resulted in new "may be used uninitialized" build warnings, first noticed in the "protocol" module. When compiling with derr=TRUE, those warnings became errors, which made the build fail.
Compiler options like |
…bmodules" This reverts commit e103657.
* Resolves an issue introduced by XRPLF#5111, which inadvertently removed the -Wno-maybe-uninitialized compiler option from some modules. This resulted in new "may be used uninitialized" build warnings, first noticed in the "protocol" module. When compiling with derr=TRUE, those warnings became errors, which made the build fail.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5228 +/- ##
=========================================
- Coverage 78.0% 78.0% -0.0%
=========================================
Files 789 789
Lines 66953 66955 +2
Branches 8107 8110 +3
=========================================
- Hits 52218 52213 -5
- Misses 14735 14742 +7
|
* upstream/develop: chore: add macos dependency installation (5233) prefix Uint384 and Uint512 with Hash in server_definitions (5231) refactor: add `rpcName` to `LEDGER_ENTRY` macro (5202)
Note to self: Also need to move the Edit Turns out that target properties don't propagate to dependents the way compile definitions and options do. So I added a |
* Turns out that target properties don't propagate to dependents the way compile definitions and options do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor remarks aside which are for your consideration but aren't blockers, I like this change a lot.
D'oh! What an oversight! I'll change it to |
Annoyingly, this fails with gcc 13, while
|
Commit message:
|
Issues have been resolved. John is not expected to be available to follow-up.
* Resolves an issue introduced in #5111, which inadvertently removed the -Wno-maybe-uninitialized compiler option from some xrpl.libxrpl modules. This resulted in new "may be used uninitialized" build warnings, first noticed in the "protocol" module. When compiling with derr=TRUE, those warnings became errors, which made the build fail. * Github CI actions will build with the assert and werr options turned on. This will cause CI jobs to fail if a developer introduces a new compiler warning, or causes an assert to fail in release builds. * Includes the OS and compiler version in the linux dependencies jobs in the "check environment" step. * Translates the `unity` build option into `CMAKE_UNITY_BUILD` setting.
This reverts commit 6bc7837.
…RPLF#5228)"" This reverts commit ef5647b.
- PR #5228 added assert=TRUE and werr=TRUE CMake flags to the build/action.yml script which is used by all CI jobs to build rippled, ensuring those flags were always set. The assumption was that only the CI jobs used that script, so any extra time cost was offset by the benefit of the extra checks. That assumption was incorrect. That script is used by other downstream projects. Therefore, those flags have been moved into the individual CI jobs' "cmake-args" parameter passed to build/action.yml. This will have the same effect for CI jobs without any side effects.
- PR #5228 added assert=TRUE and werr=TRUE CMake flags to the build/action.yml script which is used by all CI jobs to build rippled, ensuring those flags were always set. The assumption was that only the CI jobs used that script, so any extra time cost was offset by the benefit of the extra checks. That assumption was incorrect. That script is used by other downstream projects. Therefore, those flags have been moved into the individual CI jobs' "cmake-args" parameter passed to build/action.yml. This will have the same effect for CI jobs without any side effects.
High Level Overview of Change
xrpl.libxrpl
cmake module to the dependency modules introduced by Enforce levelization in libxrpl with CMake #5111.assert
andwerr
options turned on. This will cause CI jobs to fail if a developer introduces a new compiler warning, or causes anassert
to fail in release builds.Context of Change
#5111 reorganized the folders in
src/libxrpl
into dependencies of thexrpl.libxrpl
cmake library. Unfortunately, this caused those modules to no longer have the settings that were applied toxrpl.libxrpl
.One of those settings was the
-Wno-maybe-uninitialized
compiler option, which resulted in new "may be used uninitialized" build warnings. When compiling with derr=TRUE, those warnings became errors, which made the build fail. The first occurence was in the "protocol" module, but there were others.(Incidentally, this also disabled Antithesis instrumentation (#5042 #5213) in those modules.)
Type of Change
Before / After
Before:
werr
cmake option is enabled.After:
werr
cmake option is enabled.Test Plan
This does not directly change any source code or functionality, so as long as the build works, and existing tests pass, all is well.
Suggested commit message