Skip to content

Conversation

@omoerbeek
Copy link
Member

@omoerbeek omoerbeek commented Dec 17, 2025

Short description

It turns out that some systems we want to support have a rather old C++ library and boost 1.66.
So partly revert the std::optional changes and work around a few issues that g++-15 reports on these systems.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
…zers not supported"

reported by g++-15 (missing initializer)

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek omoerbeek added the rec label Dec 17, 2025
@omoerbeek omoerbeek changed the title Rec suse boost66 rec: make code boost 1.66 compatible again Dec 17, 2025
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@coveralls
Copy link

coveralls commented Dec 17, 2025

Pull Request Test Coverage Report for Build 20342847085

Details

  • 98 of 101 (97.03%) changed or added relevant lines in 19 files are covered.
  • 23 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+5.9%) to 73.321%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pdns/recursordist/recursor_cache.cc 13 14 92.86%
pdns/recursordist/rec-nsspeeds.cc 7 9 77.78%
Files with Coverage Reduction New Missed Lines %
pdns/recursordist/rec-nsspeeds.cc 1 83.89%
pdns/recursordist/recursor_cache.cc 1 85.94%
pdns/recursordist/negcache.hh 2 88.0%
pdns/packethandler.cc 3 72.36%
pdns/recursordist/recpacketcache.hh 3 89.55%
pdns/recursordist/test-syncres_cc1.cc 6 90.26%
pdns/recursordist/syncres.cc 7 81.12%
Totals Coverage Status
Change from base Build 20338794597: 5.9%
Covered Lines: 128789
Relevant Lines: 164878

💛 - Coveralls

@omoerbeek omoerbeek marked this pull request as ready for review December 17, 2025 15:33
miodvallat
miodvallat previously approved these changes Dec 18, 2025
Copy link
Contributor

@miodvallat miodvallat left a comment

Choose a reason for hiding this comment

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

LGTM, but please rewrite the first commit message (or squash).

@rgacogne
Copy link
Member

It's a bit of a shame to have to revert all this changes :-/ I guess there are too many issues to make it work with boost 1.66?

@omoerbeek
Copy link
Member Author

It's a bit of a shame to have to revert all this changes :-/ I guess there are too many issues to make it work with boost 1.66?

I intend to spent some time today to see if we can work around the issue.

@omoerbeek
Copy link
Member Author

omoerbeek commented Dec 18, 2025

I could not convince the compiler that a hash function for std::optionalstd::string exists in the context of boost 1.66.

I am now pondering an alternative solution: do away with the optional, and consider an empty tag as signifying non-existence.

Strictly speaking that is changing the semantics as a present but empty tag is not longer a thing then, but as not a lot of people (none?) use the Routing tag for partitioning the record cache that should not be an issue.

@rgacogne
Copy link
Member

Without looking at the code that seems like a nice solution to me. We would have to document the change but I'm not aware of any users of the routing tag feature either, so it's unlikely to be an issue.

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Copy link
Member

@rgacogne rgacogne left a comment

Choose a reason for hiding this comment

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

Some of these changes feel a bit unrelated to the initial issue, but that's not a big deal and apart from that I'm OK with the PR.

@omoerbeek
Copy link
Member Author

Some of these changes feel a bit unrelated to the initial issue, but that's not a big deal and apart from that I'm OK with the PR.

The somewhat unrelated changes were warnings detected by the Sue boost/compiler (1.66/15) combo.

@omoerbeek omoerbeek merged commit 00707f1 into PowerDNS:master Jan 6, 2026
91 checks passed
@omoerbeek omoerbeek deleted the rec-suse-boost66 branch January 6, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants