-
Notifications
You must be signed in to change notification settings - Fork 47
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
Migrate most tool commands to dart #321
Migrate most tool commands to dart #321
Conversation
17931d7
to
2f8daed
Compare
Test will pass after #322. |
2f8daed
to
55c9e4e
Compare
As far as I remember, clang-format-11 and clang-format-12 had different formatting rules when we tested before. I'm not sure about the clang-format-10 case. We just wanted to make sure every user uses the same clang-format version. (The version is also specified in https://github.com/flutter-tizen/flutter-tizen/wiki/Style-guide for this reason.) You can change the version if you need. |
Ah, you're right. clang-format 10, 11, and 12 all dump slightly different config files for --style=Google. Our plugin C++ code just didn't have cases where those different rules would apply. I'll actually change back to using clang-format-11 as it's possible to provide a custom clang-format executable in |
fd62923
to
20eba93
Compare
* Migrate most commands to dart * Update github workflow scripts * Register and parse arguments for integration test * Code cleanups and remove .clang-format file * Use clang-format-11 * Restore .clang-format file * Fix comments and log messages * Format code and log messages * Remove newlines in help messages * Fix help message
Migrate all commands except integration test to dart. Some commands are replaced to similar ones in
flutter_plugin_tools
to reduce code maintenance, in turn there are some notable changes which are summarized below:plugins
->packages
: Due to the implementation ofPluginCommand
influtter_plugin_tools
. This change doesn't affectintegration-test
at the moment because it's not migrated to dart yet.--run-on-changed-packages
: Due to the implementation ofPluginCommand
influtter_plugin_tools
, if no packages have changed, the option makes command run on all packages. This makes sense since most changes outside packages are CI scripts and tool changes which may affect all packages. This change doesn't affectintegration-test
at the moment because it's not migrated to dart yet.option--run-on-changed-packages
can't be used together with optionpackages
(previouslyplugins
): This will make implementatingintegration-test
command in dart with the current--recipe
logic(Update the test recipe and workflow #293 (comment)) difficult so the behavior of recipe may change.build
->build-examples
(to be consistent withflutter_plugin_tools
)plugins
->list
(using commandListCommand
fromflutter_plugin_tools
)test
->integration-test
(to differentiate from unit test which may be added in the future)tidy
->format
(using commandFormatCommand
fromflutter_plugin tools
)format
(previouslytidy
): formats dart, java, objective-c, and c++. Internally it usesclang-format --style=Google
, @bbrto21 any reasons for specifically usingclang-format-11
with--style=file
?clang-format
(clang-format-10 in ubuntu 20.04) andclang-format-11
generate the same rules for--style=Google
. For dart, it runsflutter format
which is a wrapper ofdart format
.