Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: ignore deprecated-declarations warnings in objc++ macOS code #29577

Merged
merged 2 commits into from Mar 7, 2024

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Mar 6, 2024

These come from GUI code, and haven't/aren't being fixed, see discussion in bitcoin-core/gui#112. For now, just ignore them entirely. Note that this only applies to ObjCXX code, so will not hide any relevant warnings coming from C or CXX code (and they would be unlikely in any case).

Alternative to #29362 (which disables all compiler warnings, for macOS builds in the CI). This PR includes one commit from that PR.

Relevant output:

qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
@interface NSUserNotificationCenter : NSObject {
           ^
3 warnings generated.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 6, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto
Stale ACK TheCharlatan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@TheCharlatan
Copy link
Contributor

Concept ACK

@fanquake
Copy link
Member Author

fanquake commented Mar 6, 2024

Guix build aarch64:

257fe95b5cb46a779b06c744d501615da99b1890cde173dfcfc6785440524bc3  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/SHA256SUMS.part
0f04920797338ca44d74c9293b693d4c93b78dbab172fe2fd4453d119db8e8fb  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu-debug.tar.gz
34f2ab134fc8bf6a2f64de1ee05626c1aaaa50c2e8385a9481aff21db9aaab1b  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu.tar.gz
13307a3957197d3956da68f102f50a5932c428fccae6fc1c9cffa0577d9f44ba  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/SHA256SUMS.part
2997109aa88dc7051e249b88b69a33ce0861f40c162c4f4575b2a17e2ce2a3f6  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf-debug.tar.gz
12ccd94b3a727854fa2bef5f7e9e19cb645591c78213f96d229970c5f6232b0f  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf.tar.gz
86b2893c47c6bafa57e7e335f89dcf78c5fb2e753908a536f3c6aa83ea81f503  guix-build-d3c76a2e8713/output/arm64-apple-darwin/SHA256SUMS.part
8f353e97fa0f90a142d6f2b37514dab828d053b12274dc4a2116e8b664690c0d  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.tar.gz
78042ea2719f15f5b82c2ec30f871b20e7d7c486ef76a883d4e457ea255e792f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.zip
77baec15fd24946f9e74709752209c4de5a1b77bf6beeaa499a6d05997c3817f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin.tar.gz
7e3ac1c7153564ac225b4fa23db319b818ca3ad98d235bff723dbfadfb284ab8  guix-build-d3c76a2e8713/output/dist-archive/bitcoin-d3c76a2e8713.tar.gz
5711a411091ad2ebecb0959ad4937ed2246dee3d7addfd44cfc6b736b1aa3982  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/SHA256SUMS.part
5326d9da97b2c95e0baf8102b240fe1b9d7d3722c033788bffb76b228d6a49d2  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu-debug.tar.gz
68a78acdb3866ed9aff5c3a2f0c6a56e175d1e04cda618224ff70cb4c052e596  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu.tar.gz
d04d9e7f6e85d08a9894ba5c33fc604945d9296a5227df6f287ed6bb9dbfc97b  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/SHA256SUMS.part
c099db0552de5be8771c8b362b2dfea457f1c5a0ec032fcd78316642e5afaf17  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu-debug.tar.gz
0f780a7e57a7e028e7bc3bb935ed2c90d6fee17af4067289f85974f635dc897a  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu.tar.gz
4160ff7ab6d99b7fd448b800ba7df49773b8b2b5fce4d50d7a05f120e09cadb9  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/SHA256SUMS.part
8c3117ad3953cbb52188b5673cef1818d54a6e8e2b6ad092068a96f380f74e67  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu-debug.tar.gz
ac77a99bc8959a9025af97af4d1fca16e02e2fead8db722dcd3c157ae0e87440  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu.tar.gz
6b71e4d24953103b96e35c8124990ee072b202c79e39ece8de70d33b062e1fa3  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/SHA256SUMS.part
4428461488220b9d5093b645eaf2207bbb931c98b9bbe3dbcc6397ec8b0ea0fd  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.tar.gz
4cdb51891cae1302df6ef63dca3b6c44841930956a16e2cfad87d0d5e91615d7  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.zip
27fd4d745861d9577e372f3db0cce71fe8388a14e8bf374218631a9ede31d213  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin.tar.gz
f539b87e6ef5ce269ee40e98ccaf999d41612c2a75e674ee5b1e85031d9d83cb  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/SHA256SUMS.part
d5b7dea17ad1204a1b5bcc6b29641a41745c9927b203a40dc2ed24b29c9e0074  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu-debug.tar.gz
45958584e62757fe69f323b0c56d916d5c1abd87863a1237565cece9d3efdd75  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu.tar.gz
9f48fa6f3286d8a1eb17d2639730acd17e70d6eef50b3d12c07085824784b02a  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/SHA256SUMS.part
3bcf76adfccb87735d295c8dbfa98a2948cadd903b52d3029762c8dea7000b75  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-debug.zip
5252f4ad12d3438dab38b6f65e903d273e3eb049119eed7b0d26edeee7aa0c23  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-setup-unsigned.exe
519743ecb942d7b85417846b72f41b46ab01ce81732cd80fd3e256d252877599  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-unsigned.tar.gz
efae62390e14cd79b4dfddb53efa98a3dbc2afb9826b47bf2eddd146191975a5  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64.zip

Copy link
Contributor

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

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

ACK d3c76a2

Guix build (x86):

257fe95b5cb46a779b06c744d501615da99b1890cde173dfcfc6785440524bc3  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/SHA256SUMS.part
0f04920797338ca44d74c9293b693d4c93b78dbab172fe2fd4453d119db8e8fb  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu-debug.tar.gz
34f2ab134fc8bf6a2f64de1ee05626c1aaaa50c2e8385a9481aff21db9aaab1b  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu.tar.gz
13307a3957197d3956da68f102f50a5932c428fccae6fc1c9cffa0577d9f44ba  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/SHA256SUMS.part
2997109aa88dc7051e249b88b69a33ce0861f40c162c4f4575b2a17e2ce2a3f6  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf-debug.tar.gz
12ccd94b3a727854fa2bef5f7e9e19cb645591c78213f96d229970c5f6232b0f  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf.tar.gz
86b2893c47c6bafa57e7e335f89dcf78c5fb2e753908a536f3c6aa83ea81f503  guix-build-d3c76a2e8713/output/arm64-apple-darwin/SHA256SUMS.part
8f353e97fa0f90a142d6f2b37514dab828d053b12274dc4a2116e8b664690c0d  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.tar.gz
78042ea2719f15f5b82c2ec30f871b20e7d7c486ef76a883d4e457ea255e792f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.zip
77baec15fd24946f9e74709752209c4de5a1b77bf6beeaa499a6d05997c3817f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin.tar.gz
7e3ac1c7153564ac225b4fa23db319b818ca3ad98d235bff723dbfadfb284ab8  guix-build-d3c76a2e8713/output/dist-archive/bitcoin-d3c76a2e8713.tar.gz
5711a411091ad2ebecb0959ad4937ed2246dee3d7addfd44cfc6b736b1aa3982  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/SHA256SUMS.part
5326d9da97b2c95e0baf8102b240fe1b9d7d3722c033788bffb76b228d6a49d2  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu-debug.tar.gz
68a78acdb3866ed9aff5c3a2f0c6a56e175d1e04cda618224ff70cb4c052e596  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu.tar.gz
d04d9e7f6e85d08a9894ba5c33fc604945d9296a5227df6f287ed6bb9dbfc97b  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/SHA256SUMS.part
c099db0552de5be8771c8b362b2dfea457f1c5a0ec032fcd78316642e5afaf17  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu-debug.tar.gz
0f780a7e57a7e028e7bc3bb935ed2c90d6fee17af4067289f85974f635dc897a  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu.tar.gz
4160ff7ab6d99b7fd448b800ba7df49773b8b2b5fce4d50d7a05f120e09cadb9  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/SHA256SUMS.part
8c3117ad3953cbb52188b5673cef1818d54a6e8e2b6ad092068a96f380f74e67  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu-debug.tar.gz
ac77a99bc8959a9025af97af4d1fca16e02e2fead8db722dcd3c157ae0e87440  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu.tar.gz
6b71e4d24953103b96e35c8124990ee072b202c79e39ece8de70d33b062e1fa3  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/SHA256SUMS.part
4428461488220b9d5093b645eaf2207bbb931c98b9bbe3dbcc6397ec8b0ea0fd  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.tar.gz
4cdb51891cae1302df6ef63dca3b6c44841930956a16e2cfad87d0d5e91615d7  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.zip
27fd4d745861d9577e372f3db0cce71fe8388a14e8bf374218631a9ede31d213  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin.tar.gz
f539b87e6ef5ce269ee40e98ccaf999d41612c2a75e674ee5b1e85031d9d83cb  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/SHA256SUMS.part
d5b7dea17ad1204a1b5bcc6b29641a41745c9927b203a40dc2ed24b29c9e0074  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu-debug.tar.gz
45958584e62757fe69f323b0c56d916d5c1abd87863a1237565cece9d3efdd75  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu.tar.gz
9f48fa6f3286d8a1eb17d2639730acd17e70d6eef50b3d12c07085824784b02a  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/SHA256SUMS.part
3bcf76adfccb87735d295c8dbfa98a2948cadd903b52d3029762c8dea7000b75  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-debug.zip
5252f4ad12d3438dab38b6f65e903d273e3eb049119eed7b0d26edeee7aa0c23  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-setup-unsigned.exe
519743ecb942d7b85417846b72f41b46ab01ce81732cd80fd3e256d252877599  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-unsigned.tar.gz
efae62390e14cd79b4dfddb53efa98a3dbc2afb9826b47bf2eddd146191975a5  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64.zip

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK d3c76a2.

configure.ac Outdated Show resolved Hide resolved
hebasto and others added 2 commits March 7, 2024 13:06
These come from GUI code, and haven't/aren't being fixed, see discussion
in bitcoin-core/gui#112. For now, just ignore
them entirely. Note that this only applies to ObjCXX code, so will not
hide any relevant warnings coming from C or CXX code (and they would be
unlikely in any case).

Alternative to bitcoin#29362, which disables all compiler warnings, for macOS
builds in the CI.

Relevant output:
```bash
qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
@interface NSUserNotificationCenter : NSObject {
           ^
3 warnings generated.
```
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

re-ACK 8b7630c.

@fanquake fanquake merged commit 67fb94c into bitcoin:master Mar 7, 2024
15 of 16 checks passed
@fanquake fanquake deleted the alternative_29362 branch March 7, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants