Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
170 stars 118 forks source link

update macos image from 11 to latest #5721

Closed weshaggard closed 1 week ago

weshaggard commented 1 week ago

@LarryOsterman @ahsonkhan any thoughts on the error we are hitting with the MacOS update?

/Users/runner/work/1/s/sdk/eventhubs/azure-messaging-eventhubs/test/perf/inc/azure/messaging/eventhubs/test/eventhubs_batch_perf_test.hpp:180:14: error: variable 'total' set but not used [-Werror,-Wunused-but-set-variable]
      size_t total = 0

It does appear to be an unused variable but I'm not sure why it isn't triggering on the other OSes.

ahsonkhan commented 1 week ago

I believe the strictness of unused variable warnings and flags are compiler specific. So, the compiler on MacOS (clang?) happens to catch it but others like on Windows (MSVC) doesn't.

That's one of the reasons why we test on multiple OSes, to get such coverage.

The change seems reasonable for this PR, especially since it is in tests. That said, I'll let Larry follow-up on whether we should remove the lines all together, since he owns EventHubs.

weshaggard commented 1 week ago

I believe the strictness of unused variable warnings and flags are compiler specific. So, the compiler on MacOS (clang?) happens to catch it but others like on Windows (MSVC) doesn't.

That's one of the reasons why we test on multiple OSes, to get such coverage.

The change seems reasonable for this PR, especially since it is in tests. That said, I'll let Larry follow-up on whether we should remove the lines all together, since he owns EventHubs.

There are more issues showing up on the mac build now as well. I'd appreciate if someone on the c++ team could help with those issues so that we can get the mac build unblocked.

weshaggard commented 1 week ago

Looks like the changes made in https://github.com/Azure/azure-sdk-for-cpp/pull/5681 fixed the macos build issues.