Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Apr 6, 2023

Xcode 14.3 (released March 30, 2023) stopped building automatic reference counted (ARC) code targeting < iOS 9 or < macOS 10.11 by removing a libarclite_* library from the toolchain that was needed to link for these older targets.

Flutter was already forcing Flutter plugins to the same minimum version as the app, but wasn't doing so for the plugins's transitive dependencies. In particular, some Firebase plugins depend on pods targeting lower versions.

Force transitive dependencies to a minimum version of at least iOS 9 or macOS 10.11.

https://ci.chromium.org/p/flutter/builders/try/Mac%20plugin_test_ios/16683
https://ci.chromium.org/p/flutter/builders/try/Mac%20plugin_test_macos/3136

Fixes #124340

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, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. platform-mac Building on or for macOS specifically t: xcode "xcodebuild" on iOS and general Xcode project management labels Apr 6, 2023
@jmagman jmagman self-assigned this Apr 6, 2023
@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Apr 6, 2023
@jmagman jmagman marked this pull request as ready for review April 6, 2023 22:33
return unless target.dependencies.any? { |dependency| dependency.name == 'FlutterMacOS' }

# [target.deployment_target] is a [String] formatted as "10.8".
deployment_target_major, deployment_target_minor = target.deployment_target.match(/(\d+).?(\d*)/).captures
Copy link
Contributor

Choose a reason for hiding this comment

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

unrelated, but we should escape the . here, right? we can do it later if you want to hotfix this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, human regex debugger. I'll do that in master though as you say since I do want to hotfix this.

build_configuration.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.11' if force_to_arc_supported_min

# Skip other updates if it's not a Flutter plugin (transitive dependency).
next unless target.dependencies.any? { |dependency| dependency.name == 'FlutterMacOS' }
Copy link
Contributor

Choose a reason for hiding this comment

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

what if it has dependencies that have dependencies on FlutterMacOS?

Copy link
Member Author

Choose a reason for hiding this comment

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

They would each be processed separately in this loop. The ones that depend on Flutter (Flutter plugins) will continue no matter if it's a dependency of something else or not, but the ones that don't (non-Flutter plugin transitive dependencies) won't.

Did I understand the question?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh, makes sense!

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

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

LGTM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 7, 2023
@auto-submit auto-submit bot merged commit c60f202 into flutter:master Apr 7, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 8, 2023
@jmagman jmagman deleted the arc-version branch April 10, 2023 17:28
jmagman added a commit to jmagman/flutter that referenced this pull request Apr 10, 2023
…utter#124349)

Force plugin transitive dependencies to an ARC compatible version
itsjustkevin pushed a commit that referenced this pull request Apr 10, 2023
exaby73 pushed a commit to NevercodeHQ/flutter that referenced this pull request Apr 17, 2023
…utter#124349)

Force plugin transitive dependencies to an ARC compatible version
stuartmorgan-g pushed a commit to stuartmorgan-g/flutter that referenced this pull request May 11, 2023
…utter#124349)

Force plugin transitive dependencies to an ARC compatible version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. platform-ios iOS applications specifically platform-mac Building on or for macOS specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

3 participants