Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[flutter_plugin_tools] Add 'main' support #4474

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

stuartmorgan-g
Copy link
Contributor

Treat main the same as master for branch-based switching, in
preparation for switching the branch names in Flutter repositories.

Also updates all of the tests that used master as the explicit base to
use main instead; what the tests use is arbitrary, so they can be
switched now even though the repo itself hasn't switched.

Part of flutter/flutter#90476

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 relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

Treat `main` the same as `master` for branch-based switching, in
preparation for switching the branch names in Flutter repositories.

Also updates all of the tests that used `master` as the explicit base to
use `main` instead; what the tests use is arbitrary, so they can be
switched now even though the repo itself hasn't switched.

Part of flutter/flutter#90476
@@ -273,6 +275,7 @@ ${indentation}HTTP response: ${pubVersionFinderResponse.httpResponse.body}
}
} else {
final GitVersionFinder gitVersionFinder = await retrieveVersionFinder();
previousVersionSource = await gitVersionFinder.getBaseSha();
Copy link
Member

Choose a reason for hiding this comment

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

This is a logical change since getBaseSha() isn't necessarily master (or main), right? This sounds like the correct thing to do. It might be worth mentioning this a bit more explicitly in the description in case it does cause some problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a logical change since getBaseSha() isn't necessarily master (or main), right?

In that the error logging was wrong before, and now isn't, yes. getBaseSha() is what the code that populates previousVersion actually uses; the error logging on failure (which is all this is used for) was incorrectly hard-coding that to master. In practice, in presubmit, it's the same thing, so it hadn't been noticed.

It might be worth mentioning this a bit more explicitly in the description in case it does cause some problems.

It would only be a problem if something were parsing human-targeted error output (which we aren't, and we only guarantee this tool's behavior for our use currently), and relying on the exact output, and were using a base revision other than master.

@stuartmorgan-g stuartmorgan-g added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Nov 8, 2021
@stuartmorgan-g stuartmorgan-g merged commit bc95853 into flutter:master Nov 10, 2021
@stuartmorgan-g stuartmorgan-g deleted the script-main-support branch November 10, 2021 19:46
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 10, 2021
amantoux pushed a commit to amantoux/plugins that referenced this pull request Dec 11, 2021
Treat `main` the same as `master` for branch-based switching, in
preparation for switching the branch names in Flutter repositories.

Also updates all of the tests that used `master` as the explicit base to
use `main` instead; what the tests use is arbitrary, so they can be
switched now even though the repo itself hasn't switched.

Part of flutter/flutter#90476
KyleFin pushed a commit to KyleFin/plugins that referenced this pull request Dec 21, 2021
Treat `main` the same as `master` for branch-based switching, in
preparation for switching the branch names in Flutter repositories.

Also updates all of the tests that used `master` as the explicit base to
use `main` instead; what the tests use is arbitrary, so they can be
switched now even though the repo itself hasn't switched.

Part of flutter/flutter#90476
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants