Skip to content

Conversation

@reidbaker
Copy link
Contributor

@reidbaker reidbaker commented Nov 30, 2023

  • Use copy task that branches for 8.3 and above to avoid using project.exec in a dolast block.

part 1/n for /issues/138523

This PR does not test the 8.3 branch but instead builds the ability to write a branching gradle test.
After fixing this project.exec action there I discovered a second that needs to be removed or migrated in order for the build to work.

Related reading https://docs.gradle.org/8.0/userguide/configuration_cache.html#config_cache:requirements
https://docs.gradle.org/current/javadoc/org/gradle/process/ExecOperations.html (not used but considered)
https://docs.gradle.org/8.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:fileMode

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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 30, 2023
@reidbaker
Copy link
Contributor Author

Replacement copy works and existing test verifying read only behavior works. I need to add a new test to cover the branching behavior of gradle 8.3 and ensure it does not regress. Thanks to stuart I know I do not need to copy module_test but instead can follow a pattern similar to dev/devicelab/bin/tasks/plugin_test.dart where there a set of tasks with parameters that runs and allows the test to make changes based on the inputs.

@github-actions github-actions bot removed the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 5, 2023
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 5, 2023
final String platformLineSep = Platform.isWindows ? '\r\n' : '\n';

/// Combines several TaskFunctions with trivial success value into one.
TaskFunction combine(List<TaskFunction> tasks) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing in follow up PRs you will add more tasks here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes once I can make them pass. Pr fatigue is setting in and I want to get this improvement landed to minimize conflicts.

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-REPLACEME-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

was REPLACEME a note to self to change? or are we interpolating this somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the string we look for when trying to find what to replace.

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

} else {
// See https://docs.gradle.org/8.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:fileMode
// See https://github.com/flutter/flutter/pull/50047
fileMode 0644
Copy link
Contributor

Choose a reason for hiding this comment

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

this works from windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe so but dont have a windows machine to check. The test passes on windows, this is the gradle api for setting file mode which works on windows. There is not a windows specific api.

Copy link
Contributor

Choose a reason for hiding this comment

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

acknowledged. my understanding is windows' concept of permissions is much less granular than unix and thus there must be some primitive mapping of the octal codes to windows land inside gradle...

...but if the test passes that seems good enough :)

@reidbaker reidbaker requested review from a team and bartekpacia December 12, 2023 21:01
@reidbaker reidbaker marked this pull request as ready for review December 12, 2023 21:07
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
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.

LGTM, but... wow, these are some wild problems haha

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 13, 2023
@auto-submit auto-submit bot merged commit 3c80cc7 into master Dec 13, 2023
@auto-submit auto-submit bot deleted the i138523-do-not-use-project-in-do-last branch December 13, 2023 23:48
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 14, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 14, 2023
flutter/flutter@11a9cb7...a51e33a

2023-12-14 [email protected] Roll Flutter Engine from 223f4b2465dd to caf33276468b (1 revision) (flutter/flutter#140156)
2023-12-14 [email protected] Roll Packages from b5958e2 to 1151191 (10 revisions) (flutter/flutter#140154)
2023-12-14 [email protected] Roll Flutter Engine from a3f9393f9591 to 223f4b2465dd (1 revision) (flutter/flutter#140151)
2023-12-14 [email protected] Roll Flutter Engine from 913446eca57c to a3f9393f9591 (2 revisions) (flutter/flutter#140144)
2023-12-14 [email protected] Roll Flutter Engine from 923f9e29d4b5 to 913446eca57c (1 revision) (flutter/flutter#140132)
2023-12-14 [email protected] Roll Flutter Engine from 9f7004e3e30e to 923f9e29d4b5 (7 revisions) (flutter/flutter#140130)
2023-12-14 [email protected] Add self back to CODEOWNERS (flutter/flutter#140080)
2023-12-14 [email protected] Adapt wording for required Android SDK for plugins (flutter/flutter#140043)
2023-12-14 [email protected] [reland] Support conditional bundling of assets based on `--flavor` (flutter/flutter#139834)
2023-12-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Flutter Engine from 9f7004e3e30e to 45b95f264d63 (1 revision)" (flutter/flutter#140123)
2023-12-14 [email protected] [deps] update Android SDK to 34 (flutter/flutter#138183)
2023-12-14 [email protected] Roll Flutter Engine from 9f7004e3e30e to 45b95f264d63 (1 revision) (flutter/flutter#140108)
2023-12-14 [email protected] Catch `Stopwatch` with static analysis (flutter/flutter#140019)
2023-12-14 [email protected] Overlay supports unconstrained environments (flutter/flutter#139513)
2023-12-14 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.10 to 3.22.11 (flutter/flutter#140087)
2023-12-14 [email protected] Remove deprecated `ThemeData.selectedRowColor` (flutter/flutter#139080)
2023-12-14 [email protected] Unpin mac_toolchain version (flutter/flutter#139938)
2023-12-14 [email protected] Optimize file transfer when using proxied devices. (flutter/flutter#139968)
2023-12-14 [email protected] Add commonly used parameter names (flutter/flutter#140027)
2023-12-13 [email protected] Roll Flutter Engine from fc3267724e1b to 9f7004e3e30e (4 revisions) (flutter/flutter#140090)
2023-12-13 [email protected] [Windows] Remove header guard from generated key map (flutter/flutter#140082)
2023-12-13 [email protected] Do not use project in do last (flutter/flutter#139325)
2023-12-13 [email protected] Roll pub packages (flutter/flutter#140024)
2023-12-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Warn when Gradle plugins are applied using the legacy "apply script method" way" (flutter/flutter#140102)
2023-12-13 [email protected] Swap iOS back button icon in Material app bar (flutter/flutter#134754)
2023-12-13 [email protected] Roll Packages from 80aa46a to b5958e2 (10 revisions) (flutter/flutter#140069)
2023-12-13 [email protected] Roll Flutter Engine from 9039ac78cf03 to fc3267724e1b (26 revisions) (flutter/flutter#140084)
2023-12-13 [email protected] Warn when Gradle plugins are applied using the legacy "apply script method" way (flutter/flutter#139690)
2023-12-13 [email protected] Add self as bundler dependabot reviewer (flutter/flutter#140081)
2023-12-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal" (flutter/flutter#140085)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@asaarnak
Copy link
Contributor

@reidbaker

There seems to be an issue when using flutter beta (1a9a60d)
For example i used gradle version 8.6-rc-2 in gradle-wrapper.properties:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-rc-2-bin.zip

And got this error:

> Could not create task ':app:copyFlutterAssetsProductionDebug'.
  > For input string: "6-rc-2"

@bartekpacia
Copy link
Member

bartekpacia commented Jan 15, 2024

I think that's because compareVersionStrings() doesn't handle 8.6-rc-2. Codepath for non-stable Gradle versions is not tested.

auto-submit bot pushed a commit that referenced this pull request Jan 16, 2024
- handle number format exceptions and strip rc information from version compare
- add test that handles rc format

part 2/n #138523

Helpfully pointed out by [asaarnak](https://github.com/asaarnak) #139325 (comment)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 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