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

Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade #149204

Merged

Conversation

gmackall
Copy link
Member

@gmackall gmackall commented May 28, 2024

PR to pave the way for flutter/engine#53001 to re-land

Summary:

  • Enforces use of Kotlin >= 1.7.0 (please see below note)
  • Fixes ci failures that prevented the above PR from landing.

Details:

Because it landed initially, we are able to fake the roll in this PR to fix all the tests (see my comment).

Fixes all the tests that failed:

  1. module_test failing on multiple platforms (3/9 of the failures).
    Failure is
> Android resource linking failed
   ERROR:/b/s/w/ir/x/t/flutter_module_test.KECMXW/hello/.android/plugins_build_output/device_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

This is a rather unhelpful error message but some folks online suggest that upgrading your compileSdk version fixes this.
These resolve when I remove the dependency on the long discontinued package_info and device_info packages, perhaps because they are transitively pulling in low compileSdk versions? This is unclear to me.

  1. module_custom_host_app_name_test was failing for the same reason (another 3/9, or cumulative 6/9).
  2. tool_integration_tests_3_4 was a flake 🙂 (7/9)
  3. framework_tests_slow needed a newer version of the Kotlin Gradle plugin (the flutter tool tells us this, so I just upgraded as suggested) and it resolved (8/9)
    5.android_preview_tool_integration_tests needed newer AGP and KGP versions. I also refactored the tests, and bumped our error versions, fixing Activate error versions for Gradle, Java, AGP, and KGP #142653.

Note that the bump to KGP is not in line with our policy - we didn't warn for 1.5.0-1.6.x for a release (or at all) before dropping support. But I think it might still be justified:

  • The bump to our androidx libraries unblocks ongoing Scribe work, and also includes a fix for a memory leak and a crash on folding phones, among many other bug fixes.
  • Gradle doesn't test on half of that range, and so we implicitly can't claim to support it either. More generally, our Java and Kotlin support ranges should probably strictly fall within what Gradle tests.

Pre-launch Checklist

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

@gmackall gmackall changed the title mock the engine roll UNDOUNDOUNDOUNDOUNDOUNDOUNDO Fix problems with androidx upgrade May 28, 2024
@github-actions github-actions bot added the engine flutter/engine repository. See also e: labels. label May 28, 2024
@gmackall

This comment was marked as outdated.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 28, 2024
bin/internal/engine.version Outdated Show resolved Hide resolved
@gmackall
Copy link
Member Author

Three tests fail in android_preview_tool_integration_tests - two of the failures are fixed by upgrading AGP versions, which we can technically do according to the policy at #140913. But the last one requires a newer version of Kotlin (at least 1.7.10), which would break the policy currently unfortunately

@reidbaker reidbaker self-requested a review May 29, 2024 14:30
@gmackall
Copy link
Member Author

Bonus, the refactor to the dependency version checker tests should make it very easy for us to set up a suite of tests that range our Gradle/AGP/KGP versions

@gmackall gmackall requested a review from a team May 29, 2024 19:02
@gmackall gmackall marked this pull request as ready for review May 29, 2024 19:02
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #149204 at sha 0bdbb30

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label May 29, 2024
@gmackall gmackall changed the title Fix problems with androidx upgrade Fix test failures blocking androidx upgrade May 29, 2024
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

I cant tell if this is a staging pr or one that you intend to land. The engine.version is still present that your comment says should not be landed but this is not a draft and this pr set the minimum kotlin version.

If this is the pr to set the error version of kotlin then lets me that the title and first points in the pr description.

@github-actions github-actions bot removed the engine flutter/engine repository. See also e: labels. label May 29, 2024
@gmackall gmackall changed the title Fix test failures blocking androidx upgrade Make flutter tool enforce >= kotlin 1.7.0, and Fix test failures blocking androidx upgrade May 29, 2024
@gmackall
Copy link
Member Author

gmackall commented May 29, 2024

I cant tell if this is a staging pr or one that you intend to land. The engine.version is still present that your comment says should not be landed but this is not a draft and this pr set the minimum kotlin version.

If this is the pr to set the error version of kotlin then lets me that the title and first points in the pr description.

This is the PR I intend to land, I'd left the engine hash to show tests passing. I've reverted that change now though so it's clearer. Also changed title and added summary to description

Sorry for the confusion!

@gmackall gmackall requested review from reidbaker and a team May 29, 2024 19:51
@gmackall gmackall changed the title Make flutter tool enforce >= kotlin 1.7.0, and Fix test failures blocking androidx upgrade Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade May 29, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 20, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 20, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 21, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 21, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 21, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 22, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 22, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 23, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 23, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 24, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 24, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
auto-submit bot pushed a commit that referenced this pull request Jul 16, 2024
…151845)

Not needed after #149204 (as long as nothing has changed since the comment was made �).

Fixes #145105.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
…AGP 7.0.0, and Fix test failures blocking androidx upgrade (flutter/flutter#149204)
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…lutter#151845)

Not needed after flutter#149204 (as long as nothing has changed since the comment was made �).

Fixes flutter#145105.
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#151845)

Not needed after flutter#149204 (as long as nothing has changed since the comment was made �).

Fixes flutter#145105.
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