Conversation
|
The change fixed one error, but then exposed another one. I don't have a macos machine, so I'm not sure how much dev I'm going to do on this |
std::shared_ptr::unique() is deprecated in C++17 and removed in C++20. The CI builds on macos fail because of this
On macos, protobuf depends on abseil, which doesn't build cleanly with the -Werror and -pedantic options we use in CI. However this is a 3rd party library, so these errors aren't useful for us. This is a bit of a hack, but it changes the protobuf include paths to be "system" paths (with -isystem), which tells the compiler to ignore them for the purposes of pedantic warning checking.
|
I took a different approach for the macos builds: While there was one code change in our code base, the vast majority of the build errors was in the 3rd-party abseil library (a dependency of protobuf). While it supports C++17, it doesn't build cleanly with our On the linux side, I dropped ubuntu 20.04 from CI (which is 5 years old and no longer supported by github actions) and added ubuntu 24.04 (the latest LTS version at the time of this writing) |
|
After a lot of back and forth I've concluded that #1374 is a better option, as much as it pains me to drop -pedantic. Otherwise I think we'll just be chasing this forever. |
|
I'm not sure we would have been chasing it forever, but my PR here fails to do anything for actual users on macos (it only addresses CI), so for that reason alone, I think the other change is better |
std::shared_ptr::unique() is deprecated in C++17 and removed in C++20.
The CI builds on macos fail because of this
https://en.cppreference.com/w/cpp/memory/shared_ptr/use_count.html