Skip to content

Conversation

@gmackall
Copy link
Member

@gmackall gmackall commented Feb 7, 2024

Re land of #142000.
Differences:

  1. Fixed the test that was failing in postsubmit. The reason was that the Flutter Gradle Plugin was being applied after KGP in that test, so we couldn't find the KGP version. This caused a log, and the test expects no logs. I moved FGP to after KGP
  2. Added to the logs for when we can't find AGP. Change is from

"Warning: unable to detect project AGP version. Skipping version checking."

to

"Warning: unable to detect project AGP version. Skipping version checking. \nThis may be because you have applied the Flutter Gradle Plugin after AGP."

update: the above is wrong, changed to

"Warning: unable to detect project KGP version. Skipping version checking. \nThis may be because you have applied AGP after the Flutter Gradle Plugin."

  1. Added a note to the app-level build.gradle templates that FGP must go last

// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugin.

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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 7, 2024
@gmackall
Copy link
Member Author

gmackall commented Feb 7, 2024

Audited all other integration tests, and they have the correct order.

@gmackall gmackall marked this pull request as ready for review February 7, 2024 23:42
Copy link
Member

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

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

RSLGTM (I also approved the now-reverted PR). Happy to see this kind of version enforcement being made:)

Comment on lines +331 to +334
final String dependencyCheckerPluginPath = Paths.get(flutterRoot.absolutePath,
"packages", "flutter_tools", "gradle", "src", "main", "kotlin",
"dependency_version_checker.gradle.kts")
project.apply from: dependencyCheckerPluginPath
Copy link
Member

Choose a reason for hiding this comment

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

maybe we could add a TODO or something similar that links to #121541. E.g.

We apply a Gradle plugin because we can't use import statements for backward compatibility reasons. See #121541 for more info.

just an idea

Copy link
Member

Choose a reason for hiding this comment

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

or link to this comment: #142000 (comment)

(I can image people in the future being confused by 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.

Good idea, added a todo with explanation and link to #121541 (comment)

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 8, 2024
@auto-submit auto-submit bot merged commit 4b0abc7 into flutter:master Feb 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
@camsim99
Copy link
Contributor

@gmackall This may be causing a failure for the Flutter --> packages roller, like flutter/packages#6100 with failed build https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/6190/overview for example, with the failure:

FAILURE: Build failed with an exception.

* Where:
Script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 333

* What went wrong:
Could not compile script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 333: unexpected token: && @ line 333, column 17.
                     && project.getProperty("skipDependencyChecks");
                     ^

  1 error

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
@reidbaker reidbaker added the revert Autorevert PR (with "Reason for revert:" comment) label Feb 12, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 12, 2024

Time to revert pull request flutter/flutter/143132 has elapsed.
You need to open the revert manually and process as a regular pull request.

@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Feb 12, 2024
@reidbaker
Copy link
Contributor

Reason for revert: Broke packages roller

@gmackall
Copy link
Member Author

@gmackall This may be causing a failure for the Flutter --> packages roller, like flutter/packages#6100 with failed build https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/6190/overview for example, with the failure:

FAILURE: Build failed with an exception.

* Where:
Script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 333

* What went wrong:
Could not compile script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 333: unexpected token: && @ line 333, column 17.
                     && project.getProperty("skipDependencyChecks");
                     ^

  1 error

Thanks, I'll get the legacy test running and see why.

@reidbaker
Copy link
Contributor

@gmackall This may be causing a failure for the Flutter --> packages roller, like flutter/packages#6100 with failed build https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/6190/overview for example, with the failure:

FAILURE: Build failed with an exception.

* Where:
Script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 333

* What went wrong:
Could not compile script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 333: unexpected token: && @ line 333, column 17.
                     && project.getProperty("skipDependencyChecks");
                     ^

  1 error

Thanks, I'll get the legacy test running and see why.

One think to note here is that invalid token is basically a compile error. Which means we do not have framework tests that cover that line.

@gmackall
Copy link
Member Author

gmackall commented Feb 12, 2024

That test is passing on the non-legacy version of the exact same test, though. I don't think the issue is that it isn't covered. Or at least, not coverage of that specific line. The coverage is also tied to how old the project is and/or the environment (I'm not certain exactly how legacy the legacy test is)

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
auto-submit bot pushed a commit that referenced this pull request Feb 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2024
auto-submit bot pushed a commit that referenced this pull request Feb 13, 2024
… versions (#143341)

This is a direct revert of (the revert of (the reland of (the policy pr))): #143132. 

The only change is:
1. to put a conditional all on one line, because the packages repository has a test that uses an old flutter project to make sure nothing regresses. The old project uses an old gradle version, and the old gradle version bundles an old groovy version, and the old groovy version has a bug where lines that start with `&&` don't always work: https://issues.apache.org/jira/browse/GROOVY-7218 (I enjoy that the revert reason ends up providing another strong justification to go forward with the policy). Also thanks to @reidbaker for pointing out this bug.
2. I also made a slight formatting change to the messages that print when out of the support bounds, which I think looks slightly better.

I tested this with on a branch that included a revert of #142008, and was able to recreate the failure and verify that it was resolved by 1).
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 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