Skip to content

[flutter_tools] write sksl on exit #58743

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

Merged
merged 6 commits into from
Jun 5, 2020

Conversation

jonahwilliams
Copy link
Member

@jonahwilliams jonahwilliams commented Jun 5, 2020

Description

Allow dumping sksl files on driver exit when a file path is provided to drive's --write-sksl-on-exit

Fixes #54484

@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 5, 2020
@@ -111,7 +114,11 @@ class DriveCommand extends RunCommandBase {
'Works only if \'browser-name\' is set to \'android-chrome\'')
..addOption('chrome-binary',
help: 'Location of Chrome binary. '
'Works only if \'browser-name\' is set to \'chrome\'');
'Works only if \'browser-name\' is set to \'chrome\'')
Copy link
Member Author

Choose a reason for hiding this comment

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

@liyuqian would it be easier if the command required you to pass in a destination file?

like --write-sksl-on-exit=foo.sksl.json ?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds good to me. It also makes my test easier as I don't have to worry about whether the tool will create sksl_02.json or sksl_01.json. With --write-sksl-on-exit=foo.sksl.json , I'd expect the file to be overwritten, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup!

Copy link
Contributor

@liyuqian liyuqian left a comment

Choose a reason for hiding this comment

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

LGTM! I'll later test this with #56638 so we'll have some test coverages soon.

@jonahwilliams
Copy link
Member Author

SG, I added a trivial unit test - your benchmark could be the integration test

@jonahwilliams jonahwilliams merged commit 1e4d9f8 into flutter:master Jun 5, 2020
@jonahwilliams jonahwilliams deleted the write_sksl_on_exit branch June 5, 2020 18:01
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
)

Allow dumping sksl files on driver exit when a file path is provided to drive's --write-sksl-on-exit
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically write SkSLs with --cache-sksl flag
4 participants