Refactor and polish the 'felt' tool#12258
Conversation
lib/web_ui/dev/chrome_installer.dart
Outdated
| } | ||
|
|
||
| @override | ||
| String get name => 'chrome-installer'; |
There was a problem hiding this comment.
Should we adopt verbs instead of nouns for command names? "install-chrome", "test", etc.
lib/web_ui/dev/felt
Outdated
| fi | ||
|
|
||
| (cd $WEB_UI_DIR && $DART_SDK_DIR/bin/dart dev/felt.dart $@) | ||
| ($DART_SDK_DIR/bin/dart "$DEV_DIR/felt.dart" $@) |
There was a problem hiding this comment.
It seems you don't need the parens any more
lib/web_ui/dev/test_runner.dart
Outdated
| _checkExitCode(); | ||
| } | ||
| @override | ||
| final String name = 'tests'; |
lib/web_ui/dev/licenses.dart
Outdated
|
|
||
| class LicensesCommand extends Command<bool> { | ||
| @override | ||
| final String name = 'licenses'; |
There was a problem hiding this comment.
How about "check-licenses"?
There was a problem hiding this comment.
I imagine it will be used infrequently. Instead, we'll probably have a felt presubmit that we'll encourage everyone to run before sending a PR.
There was a problem hiding this comment.
I made the change anyway :)
lib/web_ui/dev/utils.dart
Outdated
| import 'environment.dart'; | ||
|
|
||
| class FilePath { | ||
| FilePath.fromCwd(String filePath) : _path = path.absolute(filePath); |
There was a problem hiding this comment.
nit: I'd call it FilePath.relativeToCwd and rename filePath to relativePath.
There was a problem hiding this comment.
In case you haven't noticed, there are getters called relativeToCwd and relativeToWebUi. If I rename the constructors, what should I call the getters, any idea?
There was a problem hiding this comment.
Ah, nvm then. "From" seems to convey the meaning just fine.
lib/web_ui/dev/utils.dart
Outdated
| FilePath.fromWebUi(String filePath) | ||
| : _path = path.join(environment.webUiRootDir.path, filePath); | ||
|
|
||
| final String _path; |
There was a problem hiding this comment.
Should this be called _absolutePath to be absolutely clear :)
lib/web_ui/dev/utils.dart
Outdated
|
|
||
| @override | ||
| bool operator ==(dynamic other) { | ||
| if (other is String) { |
There was a problem hiding this comment.
Hmm, not sure about this :/ Equality is supposed to be symmetric.
lib/web_ui/dev/felt
Outdated
| fi | ||
|
|
||
| (cd $WEB_UI_DIR && $DART_SDK_DIR/bin/dart dev/felt.dart $@) | ||
| ($DART_SDK_DIR/bin/dart "$DEV_DIR/felt.dart" $@) |
There was a problem hiding this comment.
Can you please add set -e at the top of the script so it doesn't keep on truckin' when intermediate commands fail?
| final List<String> validationErrors = <String>[]; | ||
| scene.debugValidate(validationErrors); | ||
| if (validationErrors.isNotEmpty) { | ||
| print('ENGINE LAYER TREE INCONSISTENT:\n' |
There was a problem hiding this comment.
@yjbanov FYI this is spamming our test output so I'll skip it in test mode.
There was a problem hiding this comment.
It is trying to surface a problem though. I was meaning to look into it.
lib/web_ui/dev/felt.dart
Outdated
| io.exit(64); // Exit code 64 indicates a usage error. | ||
| } else if (!result) { | ||
| if (result == false) { | ||
| print('Command returned false: `felt ${args.join(' ')}`'); |
There was a problem hiding this comment.
Actually, it's not the felt ARGS that returned false but a sub-command, so more like Sub-command returned false: ${args.join(' '}
git@github.com:flutter/engine.git/compare/2c4ed36c60ae...8a8610a git log 2c4ed36..8a8610a --no-merges --oneline 2019-09-16 liyuqian@google.com Implement Base32Decode (flutter/engine#12253) 2019-09-16 liyuqian@google.com Reland "Smooth out iOS irregular input events delivery (#11817)" (flutter/engine#12280) 2019-09-16 mouad.debbar@gmail.com Refactor and polish the 'felt' tool (flutter/engine#12258) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
git@github.com:flutter/engine.git/compare/2c4ed36c60ae...8a8610a git log 2c4ed36..8a8610a --no-merges --oneline 2019-09-16 liyuqian@google.com Implement Base32Decode (flutter/engine#12253) 2019-09-16 liyuqian@google.com Reland "Smooth out iOS irregular input events delivery (flutter#11817)" (flutter/engine#12280) 2019-09-16 mouad.debbar@gmail.com Refactor and polish the 'felt' tool (flutter/engine#12258) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jimgraham@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
felt test,felt check-licenses).build/watchcommand is coming).