-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Conversation
.github/PULL_REQUEST_TEMPLATE.md
Outdated
@@ -8,7 +8,7 @@ | |||
|
|||
- [ ] 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] and the [C++, Objective-C, Java style guides]. | |||
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ ] I have formatted this PR with `dartfmt -w .`, read the [Flutter Style Guide] and followed the [C++, Objective-C, Java style guides].
Is there a plugins command that we can provide so users can quickly format all the source they might have touched in their PR? Something that guarantees that the format
step will pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to say dart run ./script/tool/lib/src/main.dart format
this those all of those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/PULL_REQUEST_TEMPLATE.md
Outdated
@@ -8,7 +8,7 @@ | |||
|
|||
- [ ] 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] and the [C++, Objective-C, Java style guides]. (Note that not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo.) | |||
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo. Run `dart run ./script/tool/lib/src/main.dart format` under plugins/ to auto format all source code.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not like the -> unlike the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only work if they have done a pub get
there. I think we should put instructions in CONTRIBUTING.md, and then link directly to that part of it from here.
@stuartmorgan @ditman @blasten I updated the contribution guide to reflect the new tooling process we use, and updated the template to point user there. |
@@ -48,6 +48,14 @@ for any of the following plugins, we encourage you to submit it | |||
fetch from the master repository, not your clone, when running `git fetch` | |||
et al.) | |||
|
|||
|
|||
## Setting up tools | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONTRIBUTING.md
Outdated
|
||
We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.) | ||
Your are likely to use some of the tooling script locally in your contributing journey. | ||
See [plugin_tools](./script/tool/README.MD) for more details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See [plugin_tools](./script/tool/README.MD) for more details | |
See [plugin_tools](./script/tool/README.MD) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONTRIBUTING.md
Outdated
pub global run flutter_plugin_tools format --plugins plugin_name | ||
pub global run flutter_plugin_tools analyze --plugins plugin_name | ||
pub global run flutter_plugin_tools test --plugins plugin_name | ||
$ cd script/tool & pub get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need for $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/tool/README.md
Outdated
|
||
``sh | ||
cd <path_to_plugins>/packages | ||
dart run ./script/tool/lib/src/main.dart publish-plugin --package $package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is $package
? did you mean <package>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, done
script/tool/README.md
Outdated
By default the tool tries to push tags to the `upstream` remote, but that and | ||
some additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"but that and some additional settings".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blasten Updated per your comments!
CONTRIBUTING.md
Outdated
pub global run flutter_plugin_tools format --plugins plugin_name | ||
pub global run flutter_plugin_tools analyze --plugins plugin_name | ||
pub global run flutter_plugin_tools test --plugins plugin_name | ||
$ cd script/tool & pub get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -48,6 +48,14 @@ for any of the following plugins, we encourage you to submit it | |||
fetch from the master repository, not your clone, when running `git fetch` | |||
et al.) | |||
|
|||
|
|||
## Setting up tools | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONTRIBUTING.md
Outdated
|
||
We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.) | ||
Your are likely to use some of the tooling script locally in your contributing journey. | ||
See [plugin_tools](./script/tool/README.MD) for more details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/tool/README.md
Outdated
|
||
``sh | ||
cd <path_to_plugins>/packages | ||
dart run ./script/tool/lib/src/main.dart publish-plugin --package $package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, done
script/tool/README.md
Outdated
By default the tool tries to push tags to the `upstream` remote, but that and | ||
some additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/PULL_REQUEST_TEMPLATE.md
Outdated
@@ -8,7 +8,7 @@ | |||
|
|||
- [ ] 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] and the [C++, Objective-C, Java style guides]. | |||
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that unlike the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo. See [plugin_tool format](../script/tool/README.md#format-code)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: `dart format`
.github/PULL_REQUEST_TEMPLATE.md
Outdated
@@ -8,7 +8,7 @@ | |||
|
|||
- [ ] 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] and the [C++, Objective-C, Java style guides]. | |||
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that unlike the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo. See [plugin_tool format](../script/tool/README.md#format-code)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The structure would work better here if this said "Note that unlike the flutter/flutter repo, the flutter/plugins repo does use `dart format`."
CONTRIBUTING.md
Outdated
## Setting up tools | ||
|
||
We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.) | ||
Your are likely to use some of the tooling script locally in your contributing journey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just: "There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR.". It seems odd to frame it in terms of CI first when that's not the use case for most readers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense! Done
CONTRIBUTING.md
Outdated
pub global run flutter_plugin_tools test --plugins plugin_name | ||
* Verify changes with [plugin_tools](./script/tool/README.MD). | ||
```sh | ||
cd script/tool && pub get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing a cd
back to the repo root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CONTRIBUTING.md
Outdated
cd script/tool && pub get | ||
dart run ./script/tool/lib/src/main.dart format --plugins plugin_name | ||
pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name | ||
pub run ./script/tool/lib/src/main.dart test --plugins plugin_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these all be dart
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/tool/README.md
Outdated
@@ -1,8 +1,60 @@ | |||
# Flutter Plugin Tools | |||
|
|||
Note: The commands in tools are designed to run under plugins/ or plugins/packages/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/under plugins/at the root of the repository/ (and similar for the second part); there's no guarantee that the local checkout is called packages
even if it's the most likely scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. The I assume you meant "there's no guarantee that the local checkout is called plugins". The packages folder is defined in the repo.
script/tool/README.md
Outdated
@@ -1,8 +1,60 @@ | |||
# Flutter Plugin Tools | |||
|
|||
Note: The commands in tools are designed to run under plugins/ or plugins/packages/. | |||
|
|||
To run the tool: | |||
|
|||
```sh | |||
dart pub get | |||
dart run lib/src/main.dart <args> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is misleading, given that as we've just said above this isn't the directory you should be in when running the tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/tool/README.md
Outdated
## Format Code | ||
|
||
```sh | ||
cd <path_to_plugins>/packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "packages" from all of these examples; it's not necessary to be there, and it makes the next line wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
script/tool/README.md
Outdated
pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name | ||
``` | ||
|
||
## Run dart unit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Dart
``` | ||
|
||
## Publish and tag release | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention here that you should be at the commit of the change being published? I was doing this wrong for quite a while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. added a git checkout
command in the sh sample
script/tool/README.md
Outdated
|
||
``sh | ||
cd <path_to_plugins> | ||
git checkout <commit_hash_need_to_publish> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/need_to/to/
script/tool/README.md
Outdated
additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information. | ||
|
||
The tool wraps `pub publish` for pushing the package to pub, and then will | ||
automatically use git to try and create and push tags. It has some additional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "to try to create"
## Setting up tools | ||
|
||
We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.) | ||
There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You replied Done to the comment about rewriting this, but it doesn't seem to have been applied here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fantastic overhauling of the contributing process docs! Great stuff!
## Setting up tools | ||
|
||
There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR. | ||
See [plugin_tools](./script/tool/README.MD) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you scrub this for all instances of .MD
and replace them with .md
? I just got a 404 from one of these links due to the incorrect capitalization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thanks! Fix is here: #3815
* master: (397 commits) [in_app_purchase] Implementation of platform interface (flutter#3781) [google_sign_in] Add todo WRT correctly setting X-Goog-AuthUser header (flutter#3819) [tools] fix version check command not working for new packages (flutter#3818) [camera] android-rework part 1: Base classes to support Android Camera features (flutter#3795) fix MD (flutter#3815) Path provider windows crash fix (flutter#3814) [local_auth] docs update (flutter#3103) Update PULL_REQUEST_TEMPLATE.md (flutter#3801) [quick_actions] handle cold start on iOS correctly (flutter#3811) Replace path_provider_linux widget tests with simple unit tests (flutter#3812) [sensors] format dart code based on the new dart formatter (flutter#3809) [google_sign_in] Fix "pick account" on iOS (flutter#3805) [image_picker_platform_interface] Added pickMultiImage (flutter#3782) [in_app_purchase] Added currency code and numerical price to product detail model. (flutter#3794) [local_auth] Fix iOS crash when no localizedReason (flutter#3780) Fix and update version checks (flutter#3792) [in_app_purchase] Configured example app to use StoreKit Testing on iOS 14 (flutter#3772) [local_auth] Unnecessary reassignment in example removed (flutter#2983) [flutter_webview] Fix `allowsInlineMediaPlayback` ignored on iOS (flutter#3791) Switch script/tools over to the new analysis options (flutter#3777) ...
* master: (79 commits) Fix grammatical error in contributing guide (flutter#3217) [google_sign_in_web] fix README typos. [tool] combine run and runAndExitOnError (flutter#3827) [camera] android-rework part 2: Android auto focus feature (flutter#3796) [in_app_purchase_platform_interface] Added additional fields to ProductDetails (flutter#3826) Move all null safety packages' min dart sdk to 2.12.0 (flutter#3822) [path_provider_*] code cleanup: sort directives (flutter#3823) [in_app_purchase] Implementation of platform interface (flutter#3781) [google_sign_in] Add todo WRT correctly setting X-Goog-AuthUser header (flutter#3819) [tools] fix version check command not working for new packages (flutter#3818) [camera] android-rework part 1: Base classes to support Android Camera features (flutter#3795) fix MD (flutter#3815) Path provider windows crash fix (flutter#3814) [local_auth] docs update (flutter#3103) Update PULL_REQUEST_TEMPLATE.md (flutter#3801) [quick_actions] handle cold start on iOS correctly (flutter#3811) Replace path_provider_linux widget tests with simple unit tests (flutter#3812) [sensors] format dart code based on the new dart formatter (flutter#3809) [google_sign_in] Fix "pick account" on iOS (flutter#3805) [image_picker_platform_interface] Added pickMultiImage (flutter#3782) ...
Fixes flutter/flutter#80081