Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Aug 8, 2024

Issue Link:

#151553

Changelog Description:

Make a flutter_tools test pass on Xcode 16 beta.

Impact Description:

When we update our CI to Xcode 16 after it releases (likely in September), all tests should pass.

Workaround:

Turning off the test.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

  • Install Xcode 15 and run the test (this is happening in CI now).
  • Install Xcode 16 latest beta and run the test.

Part of #148959

…tderr (flutter#152404)

On Xcode 16 beta 3 stderr is:
```
** BUILD FAILED **
```
stdout is:
```
Writing result bundle at path:
	/var/folders/fm/wjzsj_z95ydgn4khxqgbtqx000mfq2/T/flutter_tools.PeJZlH/flutter_ios_build_temp_dirqmiKld/temporary_xcresult_bundle

error: lib/main.dart:13:11: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
  int x = 'String';
          ^
Target kernel_snapshot_program failed: Exception
Failed to package /Users/m/Projects/test_create.
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'Runner' from project 'Runner')
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
```

The tool output of `flutter build ios` shows both:
```
Building com.example.testCreate for device (ios-release)...
Automatically signing iOS for device deployment using specified development team
in Xcode project: S8QB4VV633
Running Xcode build...
Xcode build done.                                           10.1s
Failed to build iOS app
Error output from Xcode build:
�
    ** BUILD FAILED **

Xcode's output:
�
    Writing result bundle at path:
    	/var/folders/fm/wjzsj_z95ydgn4khxqgbtqx000mfq2/T/flutter_tools.Dgnlxc/flutt
    	er_ios_build_temp_dirpKTDdk/temporary_xcresult_bundle

    error: lib/main.dart:13:11: Error: A value of type 'String' can't be
    assigned to a variable of type 'int'.
      int x = 'String';
              ^
    Target kernel_snapshot_program failed: Exception
    Failed to package /Users/magder/Projects/test_create.
    note: Disabling previews because SWIFT_VERSION is set and
    SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'Runner' from
    project 'Runner')
    note: Run script build phase 'Run Script' will be run during every build
    because the option to run the script phase "Based on dependency analysis" is
    unchecked. (in target 'Runner' from project 'Runner')
    note: Run script build phase 'Thin Binary' will be run during every build
    because the option to run the script phase "Based on dependency analysis" is
    unchecked. (in target 'Runner' from project 'Runner')

Encountered error while building for device.
```

The point of this test is that you can see the error `int x = 'String';` error in the tool output. flutter#72608 (comment)

I think just updating the test to check stderr or stdout is sufficient without touching the tool behavior.

Fixes flutter#151553
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Aug 8, 2024
@flutteractionsbot
Copy link
Author

@jmagman please fill out the PR description above, afterwards the release team will review this request.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 8, 2024
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.

ship it

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 12, 2024
@christopherfujino
Copy link
Contributor

@itsjustkevin I added autosubmit already since this is just test/infra code, it will not affect customers

@auto-submit auto-submit bot merged commit dcc1f06 into flutter:flutter-3.24-candidate.0 Aug 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 21, 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 cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants