Skip to content

Commit 4d8e467

Browse files
derekmaurocopybara-github
authored andcommitted
Fix CI on macOS Sequoia
This includes fixes for both the CI scripts in the new OS image and a fix for newly detected missing nullability annotations in string_view with an upgraded Clang. It is also no longer necessary to uninstall google-benchmark since it is not installed by default in the new image. PiperOrigin-RevId: 764725127 Change-Id: I6ea8c55b4d9a9afd261bf4ae9c5e8239675ea7ca
1 parent 7e67f4f commit 4d8e467

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

absl/strings/string_view.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class ABSL_ATTRIBUTE_VIEW string_view {
376376
//
377377
// Copies the contents of the `string_view` at offset `pos` and length `n`
378378
// into `buf`.
379-
size_type copy(char* buf, size_type n, size_type pos = 0) const {
379+
size_type copy(char* absl_nonnull buf, size_type n, size_type pos = 0) const {
380380
if (ABSL_PREDICT_FALSE(pos > length_)) {
381381
base_internal::ThrowStdOutOfRange("absl::string_view::copy");
382382
}
@@ -624,7 +624,7 @@ class ABSL_ATTRIBUTE_VIEW string_view {
624624

625625
// Overload of `string_view::starts_with()` that returns true if the
626626
// `string_view` starts with the C-style prefix `s`.
627-
constexpr bool starts_with(const char* s) const {
627+
constexpr bool starts_with(const char* absl_nonnull s) const {
628628
return starts_with(string_view(s));
629629
}
630630

@@ -649,7 +649,7 @@ class ABSL_ATTRIBUTE_VIEW string_view {
649649

650650
// Overload of `string_view::ends_with()` that returns true if the
651651
// `string_view` ends with the C-style suffix `s`.
652-
constexpr bool ends_with(const char* s) const {
652+
constexpr bool ends_with(const char* absl_nonnull s) const {
653653
return ends_with(string_view(s));
654654
}
655655
#endif // ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L

ci/macos_xcode_bazel.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ if [[ -n "${ALTERNATE_OPTIONS:-}" ]]; then
5454
cp ${ALTERNATE_OPTIONS:-} absl/base/options.h || exit 1
5555
fi
5656

57-
# Avoid using the system version of google-benchmark.
58-
brew uninstall google-benchmark
59-
6057
${BAZEL_BIN} test ... \
6158
--copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \
6259
--copt="-Werror" \

ci/macos_xcode_cmake.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ set -euox pipefail
1919
# Use Xcode 16.3
2020
sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
2121

22+
brew install cmake
23+
2224
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
2325
export CTEST_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
2426

0 commit comments

Comments
 (0)