Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

iOS: Eliminate unguarded-availability opt-out#56689

Merged
auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
cbracken:eliminate-unguarded-availability-optout
Nov 18, 2024
Merged

iOS: Eliminate unguarded-availability opt-out#56689
auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
cbracken:eliminate-unguarded-availability-optout

Conversation

@cbracken

@cbracken cbracken commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

Eliminates the opt-out of -Wunguarded-availability-new in the ios_test_flutter target.

Xcode 15 beta XCTest framework headers contained unguarded usage of iOS 17 API. This bug resulted in engine build failures.

This was fixed in a later XCTest framework release.

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: error: 'XCUIAccessibilityAuditType' is only available on iOS 17.0 or newer [-Werror,-Wunguarded-availability-new]
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |                              ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: note: 'XCUIAccessibilityAuditType' has been marked as being introduced in iOS 17.0 here, but the deployment target is iOS 13.0.0
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:9: note: annotate anonymous enum with an availability attribute to silence this warning
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |         ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:383:34: note: expanded from macro 'NS_OPTIONS'
  383 | #define NS_OPTIONS(_type, _name) CF_OPTIONS(_type, _name)
      |                                  ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:155:96: note: expanded from macro 'CF_OPTIONS'
  155 | #define CF_OPTIONS(_type, _name) __attribute__((availability(swift,unavailable))) _type _name; enum __CF_OPTIONS_ATTRIBUTES : _name
      |

Issue: flutter/flutter#128958

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Eliminates the opt-out of `-Wunguarded-availability-new` in the
`ios_test_flutter` target.

Xcode 15 beta XCTest framework headers contained unguarded usage of iOS
17 API. This bug resulted in engine build failures.

This was fixed in a later XCTest framework release.

```
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: error: 'XCUIAccessibilityAuditType' is only available on iOS 17.0 or newer [-Werror,-Wunguarded-availability-new]
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |                              ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: note: 'XCUIAccessibilityAuditType' has been marked as being introduced in iOS 17.0 here, but the deployment target is iOS 13.0.0
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:9: note: annotate anonymous enum with an availability attribute to silence this warning
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |         ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:383:34: note: expanded from macro 'NS_OPTIONS'
  383 | #define NS_OPTIONS(_type, _name) CF_OPTIONS(_type, _name)
      |                                  ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:155:96: note: expanded from macro 'CF_OPTIONS'
  155 | #define CF_OPTIONS(_type, _name) __attribute__((availability(swift,unavailable))) _type _name; enum __CF_OPTIONS_ATTRIBUTES : _name
      |
```

Issue: flutter/flutter#128958.
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
@auto-submit auto-submit Bot merged commit 7643ef1 into flutter-team-archive:main Nov 18, 2024
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
@cbracken cbracken deleted the eliminate-unguarded-availability-optout branch November 18, 2024 23:23
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 18, 2024
github-merge-queue Bot pushed a commit to flutter/flutter that referenced this pull request Nov 19, 2024
flutter-team-archive/engine@878f593...7643ef1

2024-11-18 chris@bracken.jp iOS: Eliminate unguarded-availability
opt-out (flutter-team-archive/engine#56689)
2024-11-18 jacksongardner@google.com [skwasm] Use
`displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight`
(flutter-team-archive/engine#56686)
2024-11-18 chris@bracken.jp Extract TestGLContext to separate
translation unit (flutter-team-archive/engine#56647)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from b79e71223284 to
492e8347d7a4 (2 revisions) (flutter-team-archive/engine#56687)
2024-11-18 jason-simmons@users.noreply.github.com Update the Skia build
scripts for a refactoring of the Fontconfig font manager
(flutter-team-archive/engine#56684)
2024-11-18 chris@bracken.jp iOS,macOS: Enable ARC in
flutter_cflags_objc[c] (flutter-team-archive/engine#56685)
2024-11-18 matanlurey@users.noreply.github.com Re-land "Remove
`android_jit_release_x86`." (flutter-team-archive/engine#56681)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0d24bd3268ef to
b79e71223284 (1 revision) (flutter-team-archive/engine#56683)
2024-11-18 tugorez@users.noreply.github.com Flutter views can gain focus
(flutter-team-archive/engine#54985)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0b74d5c3eb4f to
0d24bd3268ef (1 revision) (flutter-team-archive/engine#56680)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 19, 2024
github-merge-queue Bot pushed a commit to flutter/flutter that referenced this pull request Nov 19, 2024
flutter-team-archive/engine@878f593...c9a965c

2024-11-18 skia-flutter-autoroll@skia.org Roll Dart SDK from
625e0a9cb67a to 05d58364e92f (1 revision) (flutter-team-archive/engine#56688)
2024-11-18 chris@bracken.jp iOS: Eliminate unguarded-availability
opt-out (flutter-team-archive/engine#56689)
2024-11-18 jacksongardner@google.com [skwasm] Use
`displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight`
(flutter-team-archive/engine#56686)
2024-11-18 chris@bracken.jp Extract TestGLContext to separate
translation unit (flutter-team-archive/engine#56647)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from b79e71223284 to
492e8347d7a4 (2 revisions) (flutter-team-archive/engine#56687)
2024-11-18 jason-simmons@users.noreply.github.com Update the Skia build
scripts for a refactoring of the Fontconfig font manager
(flutter-team-archive/engine#56684)
2024-11-18 chris@bracken.jp iOS,macOS: Enable ARC in
flutter_cflags_objc[c] (flutter-team-archive/engine#56685)
2024-11-18 matanlurey@users.noreply.github.com Re-land "Remove
`android_jit_release_x86`." (flutter-team-archive/engine#56681)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0d24bd3268ef to
b79e71223284 (1 revision) (flutter-team-archive/engine#56683)
2024-11-18 tugorez@users.noreply.github.com Flutter views can gain focus
(flutter-team-archive/engine#54985)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0b74d5c3eb4f to
0d24bd3268ef (1 revision) (flutter-team-archive/engine#56680)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 19, 2024
github-merge-queue Bot pushed a commit to flutter/flutter that referenced this pull request Nov 19, 2024
flutter-team-archive/engine@878f593...10dc07b

2024-11-18 reidbaker@google.com Update emulator definitions version to
latest available from chrome infra (flutter-team-archive/engine#56313)
2024-11-18 skia-flutter-autoroll@skia.org Roll Dart SDK from
625e0a9cb67a to 05d58364e92f (1 revision) (flutter-team-archive/engine#56688)
2024-11-18 chris@bracken.jp iOS: Eliminate unguarded-availability
opt-out (flutter-team-archive/engine#56689)
2024-11-18 jacksongardner@google.com [skwasm] Use
`displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight`
(flutter-team-archive/engine#56686)
2024-11-18 chris@bracken.jp Extract TestGLContext to separate
translation unit (flutter-team-archive/engine#56647)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from b79e71223284 to
492e8347d7a4 (2 revisions) (flutter-team-archive/engine#56687)
2024-11-18 jason-simmons@users.noreply.github.com Update the Skia build
scripts for a refactoring of the Fontconfig font manager
(flutter-team-archive/engine#56684)
2024-11-18 chris@bracken.jp iOS,macOS: Enable ARC in
flutter_cflags_objc[c] (flutter-team-archive/engine#56685)
2024-11-18 matanlurey@users.noreply.github.com Re-land "Remove
`android_jit_release_x86`." (flutter-team-archive/engine#56681)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0d24bd3268ef to
b79e71223284 (1 revision) (flutter-team-archive/engine#56683)
2024-11-18 tugorez@users.noreply.github.com Flutter views can gain focus
(flutter-team-archive/engine#54985)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0b74d5c3eb4f to
0d24bd3268ef (1 revision) (flutter-team-archive/engine#56680)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 19, 2024
github-merge-queue Bot pushed a commit to flutter/flutter that referenced this pull request Nov 19, 2024
flutter-team-archive/engine@878f593...c1b0e18

2024-11-19 jonahwilliams@google.com [Impeller] use sync fence for image
uploads. (flutter-team-archive/engine#56609)
2024-11-18 reidbaker@google.com Update emulator definitions version to
latest available from chrome infra (flutter-team-archive/engine#56313)
2024-11-18 skia-flutter-autoroll@skia.org Roll Dart SDK from
625e0a9cb67a to 05d58364e92f (1 revision) (flutter-team-archive/engine#56688)
2024-11-18 chris@bracken.jp iOS: Eliminate unguarded-availability
opt-out (flutter-team-archive/engine#56689)
2024-11-18 jacksongardner@google.com [skwasm] Use
`displayWidth`/`displayHeight` instead of `codedWidth`/`codedHeight`
(flutter-team-archive/engine#56686)
2024-11-18 chris@bracken.jp Extract TestGLContext to separate
translation unit (flutter-team-archive/engine#56647)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from b79e71223284 to
492e8347d7a4 (2 revisions) (flutter-team-archive/engine#56687)
2024-11-18 jason-simmons@users.noreply.github.com Update the Skia build
scripts for a refactoring of the Fontconfig font manager
(flutter-team-archive/engine#56684)
2024-11-18 chris@bracken.jp iOS,macOS: Enable ARC in
flutter_cflags_objc[c] (flutter-team-archive/engine#56685)
2024-11-18 matanlurey@users.noreply.github.com Re-land "Remove
`android_jit_release_x86`." (flutter-team-archive/engine#56681)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0d24bd3268ef to
b79e71223284 (1 revision) (flutter-team-archive/engine#56683)
2024-11-18 tugorez@users.noreply.github.com Flutter views can gain focus
(flutter-team-archive/engine#54985)
2024-11-18 skia-flutter-autoroll@skia.org Roll Skia from 0b74d5c3eb4f to
0d24bd3268ef (1 revision) (flutter-team-archive/engine#56680)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,zra@google.com on the revert to ensure
that a human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…ngine#56689)

Eliminates the opt-out of `-Wunguarded-availability-new` in the `ios_test_flutter` target.

Xcode 15 beta XCTest framework headers contained unguarded usage of iOS 17 API. This bug resulted in engine build failures.

This was fixed in a later XCTest framework release.

```
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: error: 'XCUIAccessibilityAuditType' is only available on iOS 17.0 or newer [-Werror,-Wunguarded-availability-new]
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |                              ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:30: note: 'XCUIAccessibilityAuditType' has been marked as being introduced in iOS 17.0 here, but the deployment target is iOS 13.0.0
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCUIAccessibilityAuditTypes.h:19:9: note: annotate anonymous enum with an availability attribute to silence this warning
   19 | typedef NS_OPTIONS(uint64_t, XCUIAccessibilityAuditType) {
      |         ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:383:34: note: expanded from macro 'NS_OPTIONS'
  383 | #define NS_OPTIONS(_type, _name) CF_OPTIONS(_type, _name)
      |                                  ^
/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:155:96: note: expanded from macro 'CF_OPTIONS'
  155 | #define CF_OPTIONS(_type, _name) __attribute__((availability(swift,unavailable))) _type _name; enum __CF_OPTIONS_ATTRIBUTES : _name
      |
```

Issue: flutter#128958

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants