Sponsored Content
Skip to content

chore: Remove unity builds - #6300

Merged
bthomee merged 9 commits into
developfrom
bthomee/unity
Feb 3, 2026
Merged

chore: Remove unity builds#6300
bthomee merged 9 commits into
developfrom
bthomee/unity

Conversation

@bthomee

@bthomee bthomee commented Jan 30, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

This change removes the ability to make unity builds.

Context of Change

Unity builds were intended to speed up builds, by bundling multiple files into compilation units. However, now that ccache is available on all platforms, there is no need for unity builds anymore, as ccache stores compiled individual build objects for reuse.

For more information on ccache please visit https://ccache.dev. You can install it via Homebrew, Chocolatey, and Apt.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

@codecov

codecov Bot commented Jan 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.9%. Comparing base (6c1a92f) to head (4770702).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6300   +/-   ##
=======================================
  Coverage     79.9%   79.9%           
=======================================
  Files          840     840           
  Lines        65548   65548           
  Branches      7268    7264    -4     
=======================================
+ Hits         52347   52350    +3     
+ Misses       13201   13198    -3     
Files with missing lines Coverage Δ
src/libxrpl/net/RegisterSSLCerts.cpp 100.0% <ø> (ø)

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's:

  1. Wait for ccache to be fixed and properly making sure it works (the current setup let us down a few times already)
  2. Please, grep for word unity and make sure there are no more places needed to be fixed

@mathbunnyru mathbunnyru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's:

  1. Wait for ccache to be fixed and properly making sure it works (the current setup let us down a few times already)
  2. Please, grep for word unity and make sure there are no more places needed to be fixed

@bthomee

bthomee commented Jan 30, 2026

Copy link
Copy Markdown
Collaborator Author

Let's:

  1. Wait for ccache to be fixed and properly making sure it works (the current setup let us down a few times already)

This has now been fixed. The instance used an ephemeral NVME disk, and after AWS performed an unasked reboot of the machine the disk got wiped including configuration settings. The machine type has now been changed and a persistent EBS volume added. For future redeployments I also fixed the private IP so the private DNS will not have to be updated. Repeated CI runs show no more connection errors, with subsequent runs using cached build objects.

  1. Please, grep for word unity and make sure there are no more places needed to be fixed

There were some all-caps references that escaped. These have now been fixed.

@ximinez ximinez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My only qualm about merging this is that, while it's tangential to removing unity, I don't want to lose the knowledge about needing to downgrade ccache on Windows builds.

Would it be worth adding something to the "Troubleshooting" section in BUILD.md, or even just a comment in CCache.cmake as part of this PR?

Other than that, this looks good to go.

Copilot AI review requested due to automatic review settings February 3, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unity build support from the XRPL codebase, as unity builds are no longer needed now that ccache is available on all platforms for build caching. The change simplifies the build configuration by removing unity-related options and conditionals.

Changes:

  • Removed unity build option from Conan and CMake configuration files
  • Updated CI/CD strategy matrix to remove unity/no-unity build variations
  • Added ccache setup documentation to BUILD.md
  • Updated header guard in rocksdb.h to reflect correct path convention
  • Updated comments explaining legacy workarounds

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
conanfile.py Removed unity option from options, default_options, and generate method
cmake/XrplSettings.cmake Removed unity build option and related CMAKE_UNITY_BUILD settings
cmake/XrplCore.cmake Removed unity build comments and exclusions for protobuf and test files
cmake/XrplAddTest.cmake Removed unity build batch size settings for test targets
BUILD.md Added ccache installation instructions and removed unity build documentation
.github/scripts/strategy-matrix/*.json Removed unity cmake_args variations from all platform configurations
.github/scripts/strategy-matrix/generate.py Removed unity build conditions from configuration filtering logic
src/libxrpl/net/RegisterSSLCerts.cpp Updated comment to note unity builds are no longer used
include/xrpl/basics/rocksdb.h Fixed header guard to follow XRPL_BASICS_ convention instead of XRPL_UNITY_

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread BUILD.md Outdated
@bthomee

bthomee commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator Author

My only qualm about merging this is that, while it's tangential to removing unity, I don't want to lose the knowledge about needing to downgrade ccache on Windows builds.

Would it be worth adding something to the "Troubleshooting" section in BUILD.md, or even just a comment in CCache.cmake as part of this PR?

Other than that, this looks good to go.

I added a new section to BUILD.md about how to install ccache, since that's actually not described anywhere at the moment, and included the troubleshooting step for Windows there. Let me know if that works.

Comment thread BUILD.md Outdated
Comment thread BUILD.md Outdated
@bthomee
bthomee requested a review from ximinez February 3, 2026 17:18
Copilot AI review requested due to automatic review settings February 3, 2026 22:09
@bthomee
bthomee enabled auto-merge (squash) February 3, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bthomee
bthomee merged commit 3a17230 into develop Feb 3, 2026
1 check passed
@bthomee
bthomee deleted the bthomee/unity branch February 3, 2026 22:55
mvadari pushed a commit to mvadari/rippled that referenced this pull request Feb 4, 2026
Unity builds were intended to speed up builds, by bundling multiple files into compilation units. However, now that ccache is available on all platforms, there is no need for unity builds anymore, as ccache stores compiled individual build objects for reuse. This change therefore removes the ability to make unity builds.
mvadari pushed a commit that referenced this pull request Feb 4, 2026
Unity builds were intended to speed up builds, by bundling multiple files into compilation units. However, now that ccache is available on all platforms, there is no need for unity builds anymore, as ccache stores compiled individual build objects for reuse. This change therefore removes the ability to make unity builds.
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Unity builds were intended to speed up builds, by bundling multiple files into compilation units. However, now that ccache is available on all platforms, there is no need for unity builds anymore, as ccache stores compiled individual build objects for reuse. This change therefore removes the ability to make unity builds.
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.

5 participants