Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Sep 28, 2024

The Objective-C flutter create --ios-language objc template will be removed in #148586.

Add a deprecation warning when this flag is passed. Add an additional warning when Objective-C is specified requesting the user's use-case.

Do not show the warning when creating the module, as Swift is not supported for it yet #23955

Screenshot 2024-09-27 at 8 54 16 PM

Part of #148586

Pre-launch Checklist

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

@jmagman jmagman self-assigned this Sep 28, 2024
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 28, 2024
@jmagman jmagman changed the title Add deprecation warning for 'flutter create --ios-language Add deprecation warning for "flutter create --ios-language" Sep 28, 2024
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

// Swift is not yet supported for add-to-app https://github.com/flutter/flutter/issues/23955.
globals.printWarning(
'The "ios-language" option is deprecated and will be removed in a future Flutter release.');
if (stringArg('ios-language') == 'objc') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want this call to action for all cases, or just plugins? I was envisioning just the latter, since the usage is higher there.

Copy link
Member Author

Choose a reason for hiding this comment

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

I figured I would do it for all in case there's some super compelling reason for the app template as well that I haven't thought of. This should be a rare warning.

I did remove the module check since no one should be using the flag for that template anyway, may as well warn them it's being removed if they are using it for some weird reason.

defaultsTo: 'swift',
allowed: <String>['objc', 'swift'],
help: 'The language to use for iOS-specific code, either Objective-C (legacy) or Swift (recommended).'
help: '(deprecated) The language to use for iOS-specific code, either Objective-C (legacy) or Swift (recommended).',
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: maybe we should swap the order so the recommended option is first?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Did the same for android-language.

exitCode: 2,
);
} else if (!generateModule && argResults!.wasParsed('ios-language')) {
// Swift is not yet supported for add-to-app https://github.com/flutter/flutter/issues/23955.
Copy link
Member

Choose a reason for hiding this comment

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

Super nit: this comment sounds like we don't support Swift in the host app, but we have docs showing you how to do that: https://docs.flutter.dev/add-to-app/ios/add-flutter-screen

Maybe:

Suggested change
// Swift is not yet supported for add-to-app https://github.com/flutter/flutter/issues/23955.
// Swift is not yet supported for add-to-app modules https://github.com/flutter/flutter/issues/23955.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just removed that comment, I changed my mind to exclude the module template since that flag is ignored, so they definitely should stop using it.

defaultsTo: 'kotlin',
allowed: <String>['java', 'kotlin'],
help: 'The language to use for Android-specific code, either Java (legacy) or Kotlin (recommended).',
help: 'The language to use for Android-specific code, either Kotlin (recommended) or Java (legacy).',
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know enough abt this area but does this section need hide: !verboseHelp, too?

Copy link
Member Author

Choose a reason for hiding this comment

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

--android-language isn't being deprecated, and not in this PR. I just changed the order to match the iOS one, and because putting the recommended one first is a good suggestion.

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 2, 2024
@auto-submit auto-submit bot merged commit 22247cd into flutter:master Oct 2, 2024
@jmagman jmagman deleted the ios-language branch October 2, 2024 16:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 8, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 8, 2024
Manual roll Flutter from 0975e61 to ec2e12b (54 revisions)

Manual roll requested by [email protected]

flutter/flutter@0975e61...ec2e12b

2024-10-03 [email protected] Roll Flutter Engine from bd44b58e3204 to 247bc68c578e (7 revisions) (flutter/flutter#156144)
2024-10-03 [email protected] Roll Flutter Engine from 70232fa124d0 to bd44b58e3204 (1 revision) (flutter/flutter#156124)
2024-10-03 [email protected] Roll Flutter Engine from 33ac1b30ab0a to 70232fa124d0 (2 revisions) (flutter/flutter#156122)
2024-10-02 [email protected] Update `ThemeData.dialogTheme` type to accept `DialogThemeData` (flutter/flutter#155129)
2024-10-02 [email protected] Roll Flutter Engine from 751ab9b3c5eb to 33ac1b30ab0a (4 revisions) (flutter/flutter#156118)
2024-10-02 [email protected] Add back main() methods to benchmark benches. (flutter/flutter#156083)
2024-10-02 [email protected] Roll pub packages (flutter/flutter#156117)
2024-10-02 [email protected] Add `mouseCursor` property to `CupertinoCheckbox` (flutter/flutter#151788)
2024-10-02 [email protected] Roll Flutter Engine from 3bdc1c0a30b6 to 751ab9b3c5eb (3 revisions) (flutter/flutter#156115)
2024-10-02 [email protected] Roll pub packages (flutter/flutter#156114)
2024-10-02 [email protected] [ Cocoon ] Wait for task results to be received by the task runner before shutting down the task process (flutter/flutter#156002)
2024-10-02 [email protected] Allow mixing route transitions in one app. (flutter/flutter#150031)
2024-10-02 [email protected] Roll Flutter Engine from f20681241753 to 3bdc1c0a30b6 (5 revisions) (flutter/flutter#156107)
2024-10-02 [email protected] Update Upgrading-Engine's-Android-API-version.md to reflect code move (flutter/flutter#156108)
2024-10-02 [email protected] Roll Packages from ebcc4f0 to 7c97c88 (5 revisions) (flutter/flutter#156106)
2024-10-02 [email protected] Roll pub packages (flutter/flutter#156105)
2024-10-02 [email protected] fix wrong test in "fixing `DropdownMenu` keyboard navigation"  (flutter/flutter#156084)
2024-10-02 [email protected] fix ReorderableList not passing in item extent builder (flutter/flutter#155994)
2024-10-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "integration_test: migrate to build.gradle.kts (#154125)" (flutter/flutter#156087)
2024-10-02 [email protected] Add deprecation warning for "flutter create --ios-language" (flutter/flutter#155867)
2024-10-02 [email protected] update flutter create generated projects to use package:flutter_lints 5.0.0 (flutter/flutter#156011)
2024-10-02 [email protected] Roll Flutter Engine from d48c35d16814 to f20681241753 (1 revision) (flutter/flutter#156080)
2024-10-02 [email protected] [Docs] `CupertinoListTile` API Example (flutter/flutter#154548)
2024-10-02 [email protected] integration_test: migrate to build.gradle.kts (flutter/flutter#154125)
2024-10-02 [email protected] Marks Windows_mokey native_assets_android to be flaky (flutter/flutter#156064)
2024-10-02 [email protected] Fix DropdownMenu does not rematch initialSelection when entries have changed (flutter/flutter#155757)
2024-10-02 [email protected] Roll Flutter Engine from 9b224bd2f895 to d48c35d16814 (1 revision) (flutter/flutter#156074)
2024-10-02 [email protected] Roll Flutter Engine from 8774940b9ddc to 9b224bd2f895 (1 revision) (flutter/flutter#156065)
2024-10-02 [email protected] Roll Flutter Engine from 21ad04948457 to 8774940b9ddc (1 revision) (flutter/flutter#156055)
2024-10-02 [email protected] Roll Flutter Engine from 767bdc38cf51 to 21ad04948457 (1 revision) (flutter/flutter#156049)
2024-10-02 [email protected] Roll Flutter Engine from 055969512dc5 to 767bdc38cf51 (1 revision) (flutter/flutter#156043)
2024-10-02 [email protected] Roll Flutter Engine from e0f049d69240 to 055969512dc5 (2 revisions) (flutter/flutter#156042)
2024-10-02 [email protected] fix `DropdownMenu` keyboard navigation when entries are filtered empty (flutter/flutter#155252)
2024-10-02 [email protected] Roll Flutter Engine from a5bc2e2708c7 to e0f049d69240 (1 revision) (flutter/flutter#156039)
2024-10-02 [email protected] mark {Linux,Windows} tool_integration_tests_* non-bringup (flutter/flutter#155773)
2024-10-02 [email protected] Roll Flutter Engine from a7abf7a8163e to a5bc2e2708c7 (2 revisions) (flutter/flutter#156038)
2024-10-02 [email protected] Roll Flutter Engine from df1982dd4482 to a7abf7a8163e (1 revision) (flutter/flutter#156032)
2024-10-02 [email protected] Add `enableSplash` parameter to `CarouselView` (flutter/flutter#155214)
2024-10-02 [email protected] Roll pub packages (flutter/flutter#156030)
2024-10-01 [email protected] Roll Flutter Engine from ab48d6d8c167 to df1982dd4482 (1 revision) (flutter/flutter#156029)
2024-10-01 [email protected] Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be unflaky (flutter/flutter#147289)
2024-10-01 [email protected] Add WidgetStateMouseCursor example and tests for it. (flutter/flutter#155552)
2024-10-01 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.5.0 to 4.6.0 (flutter/flutter#156024)
2024-10-01 [email protected] Roll Flutter Engine from e7b3ce717006 to ab48d6d8c167 (1 revision) (flutter/flutter#156023)
...
auto-submit bot pushed a commit that referenced this pull request Nov 4, 2024
We added `use_modular_headers!` to our `Podfile`s as we originally planned to phase out `use_frameworks!` (see #42204). However, our plans have now changed and we are instead phasing out CocoaPods entirely in favor of Swift Package Manager.

CocoaPods's `use_frameworks!` and `use_modular_headers!` are two different overlapping options that should not be used together. This change removes the `use_modular_headers!` from the macOS `Podfile` and the iOS Swift `Podfile` (the iOS Objective-C template was recently deprecated #155867).

This change only affects _new_ Flutter apps. This change does not include an automatic migration as that could break existing apps. Instead, users are encouraged to migrate from CocoaPods to Swift Package Manager.

#156259
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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 tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants