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

Add a build command to felt #12303

Merged
merged 1 commit into from
Sep 17, 2019
Merged

Add a build command to felt #12303

merged 1 commit into from
Sep 17, 2019

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Sep 16, 2019

The build command supports a --watch or -w flag to watch for changes and rebuild.

Fixes flutter/flutter#40392

@mdebbar mdebbar added the platform-web Code specifically for the web engine label Sep 16, 2019
@mdebbar mdebbar requested a review from yjbanov September 16, 2019 20:18
@mdebbar mdebbar self-assigned this Sep 16, 2019
'watch',
abbr: 'w',
help: 'Run the build in watch mode so it rebuilds whenever a change'
'is made.',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "a change is made" => "a file is saved"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"file is saved" isn't technically correct. A file could be removed and that would also trigger a rebuild.

String get name => 'build';

@override
String get description => 'Build the web engine package.';
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not clear what "web engine package" is. Maybe just "Build the Web version of the dart:ui library"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should agree on one name and stick to it. We are calling it "the Flutter web engine" elsewhere.

}
_pipelineRunCount++;
_pipelineScheduled = true;
Future.delayed(const Duration(milliseconds: 100)).then((_) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a more robust logic would be something like:

if (_scheduledBuild != null) {
  _scheduledBuild.cancel();
}

_scheduledBuild = Timer(const Duration(milliseconds: 100), () {
  _scheduledBuild = null;
});

IOW, if there's a sequence of file writes that's longer than 100ms (e.g. git pull) only the last write schedules the build. Intermediate timers never fire. This will reduce the number of times we stop the pipeline mid-flight.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea!

break;

case PipelineStatus.stopping:
// We are already trying to stop the pipeline. No need to do anything.
Copy link
Contributor

Choose a reason for hiding this comment

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

What will cause the pipeline to restart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous switch case does that.

- The build command supports a `--watch` or `-w` flag to watch for
changes and rebuild.

Fixes flutter/flutter#40392
@mdebbar mdebbar merged commit 7ab6956 into flutter:master Sep 17, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 17, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Sep 18, 2019
git@github.com:flutter/engine.git/compare/63873d9f421f...d1692d4

git log 63873d9..d1692d4 --no-merges --oneline
2019-09-17 hterkelsen@users.noreply.github.com Update canvaskit backend (flutter/engine#12318)
2019-09-17 mouad.debbar@gmail.com README for the felt tool (flutter/engine#12323)
2019-09-17 jason-simmons@users.noreply.github.com Fix continuous event polling in the GLFW event loop (flutter/engine#12320)
2019-09-17 15365765+rafern@users.noreply.github.com Tests for #11283 (flutter/engine#12322)
2019-09-17 ditman@gmail.com Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (flutter/engine#12229)
2019-09-17 bkonyi@google.com Roll src/third_party/dart dd1969a43a..7505b3a5f0 (39 commits)
2019-09-17 30870216+gaaclarke@users.noreply.github.com Channel buffers (flutter/engine#12167)
2019-09-17 xster@google.com Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128)
2019-09-17 stuartmorgan@google.com Adds PluginRegistry to the C++ client wrapper API (flutter/engine#12287)
2019-09-17 liyuqian@google.com Add "type" to getDisplayRefreshRate protocol (flutter/engine#12319)
2019-09-17 mouad.debbar@gmail.com Add a build command to felt (flutter/engine#12303)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia df432d5efb70..d545bfbb94ca (1 commits) (flutter/engine#12316)
2019-09-17 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from rwf0-... to RRgw-... (flutter/engine#12315)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia f8486f2c5fb6..df432d5efb70 (1 commits) (flutter/engine#12313)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia b47704b0bd34..f8486f2c5fb6 (2 commits) (flutter/engine#12312)
2019-09-16 jason-simmons@users.noreply.github.com Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (flutter/engine#12306)
2019-09-16 gw280@google.com Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#12277)
2019-09-16 goderbauer@google.com Cleanup in web_ui (flutter/engine#12307)
2019-09-16 30870216+gaaclarke@users.noreply.github.com Made flutter startup faster by allowing initialization to be parallelized (flutter/engine#10182)
2019-09-16 skia-flutter-autoroll@skia.org Roll src/third_party/skia c22498502cda..b47704b0bd34 (16 commits) (flutter/engine#12304)
2019-09-16 jonahwilliams@google.com Include firefox in check to quote font families (flutter/engine#12288)
2019-09-16 bkonyi@google.com Roll src/third_party/dart 7799f424f4..dd1969a43a (2 commits)


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 stuartmorgan@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
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Sep 30, 2019
git@github.com:flutter/engine.git/compare/63873d9f421f...d1692d4

git log 63873d9..d1692d4 --no-merges --oneline
2019-09-17 hterkelsen@users.noreply.github.com Update canvaskit backend (flutter/engine#12318)
2019-09-17 mouad.debbar@gmail.com README for the felt tool (flutter/engine#12323)
2019-09-17 jason-simmons@users.noreply.github.com Fix continuous event polling in the GLFW event loop (flutter/engine#12320)
2019-09-17 15365765+rafern@users.noreply.github.com Tests for flutter#11283 (flutter/engine#12322)
2019-09-17 ditman@gmail.com Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (flutter/engine#12229)
2019-09-17 bkonyi@google.com Roll src/third_party/dart dd1969a43a..7505b3a5f0 (39 commits)
2019-09-17 30870216+gaaclarke@users.noreply.github.com Channel buffers (flutter/engine#12167)
2019-09-17 xster@google.com Make iOS FlutterViewController stop sending inactive/pause on app lifecycle events when not visible (flutter/engine#12128)
2019-09-17 stuartmorgan@google.com Adds PluginRegistry to the C++ client wrapper API (flutter/engine#12287)
2019-09-17 liyuqian@google.com Add "type" to getDisplayRefreshRate protocol (flutter/engine#12319)
2019-09-17 mouad.debbar@gmail.com Add a build command to felt (flutter/engine#12303)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia df432d5efb70..d545bfbb94ca (1 commits) (flutter/engine#12316)
2019-09-17 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from rwf0-... to RRgw-... (flutter/engine#12315)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia f8486f2c5fb6..df432d5efb70 (1 commits) (flutter/engine#12313)
2019-09-17 skia-flutter-autoroll@skia.org Roll src/third_party/skia b47704b0bd34..f8486f2c5fb6 (2 commits) (flutter/engine#12312)
2019-09-16 jason-simmons@users.noreply.github.com Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (flutter/engine#12306)
2019-09-16 gw280@google.com Manage resource and onscreen contexts using separate IOSGLContext objects (flutter/engine#12277)
2019-09-16 goderbauer@google.com Cleanup in web_ui (flutter/engine#12307)
2019-09-16 30870216+gaaclarke@users.noreply.github.com Made flutter startup faster by allowing initialization to be parallelized (flutter/engine#10182)
2019-09-16 skia-flutter-autoroll@skia.org Roll src/third_party/skia c22498502cda..b47704b0bd34 (16 commits) (flutter/engine#12304)
2019-09-16 jonahwilliams@google.com Include firefox in check to quote font families (flutter/engine#12288)
2019-09-16 bkonyi@google.com Roll src/third_party/dart 7799f424f4..dd1969a43a (2 commits)


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 stuartmorgan@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
@mdebbar mdebbar deleted the watcher branch April 15, 2021 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web] make engine/framework dev cycle more pleasant
3 participants