bazel
bazel copied to clipboard
PPW is now broken with pkg/dazel 0.3.3
pub run dazel init - fine
pub run dazel serve
Building server via bazel...
____Loading package:
____Loading package: @local_config_cc//
____Loading package: @local_jdk//
____Loading package: @local_config_xcode//
____Loading complete. Analyzing...
____Loading package: @io_bazel_rules_dart//dart/build_rules/ext
____Loading package: @pub_xml//
____Loading package: @pub_petitparser//
____Loading package: @vendor_args//
____Loading package: @vendor_shelf//
____Loading package: @vendor_charcode//
____Loading package: @vendor_typed_data//
____Found 1 target...
____Building...
WARNING: DartSummary worker (id 3) can no longer be used, because its process terminated itself or got killed.
____[23 / 38] Summarizing Dart library @pub_petitparser//:petitparser (strong mode)
WARNING: DartSummary worker (id 5) can no longer be used, because its process terminated itself or got killed.
ERROR: /private/var/tmp/_bazel_kevmoo/9258079d3d84259f64887875b6d7c403/external/vendor_js/BUILD:8:1: Summarizing Dart library @vendor_js//:js (strong mode) failed: Worker process did not return a WorkResponse. This is probably caused by a bug in the worker, writing unexpected other data to stdout..
WARNING: DartSummary worker (id 6) can no longer be used, because its process terminated itself or got killed.
Target //:__ddc_serve_all failed to build
Use --verbose_failures to see the command lines of failed build steps.
____Elapsed time: 4.826s, Critical Path: 0.14s
bazel failed with a non-zero exit code.
It's not clear to me what changed here.
The error we see is:
The --persistent_worker flag should be used with and only with the --build-mode flag, and possibly the --dart-sdk option. Got: [--dart-sdk=/usr/local/google/home/nbosch/.cache/bazel/_bazel_nbosch/d4731d00425ab54310ebcf199b4e797e/external/dart_linux_x86_64/dart-sdk, --build-mode, --persistent_worker]
The check is happening here and I think it's happening because we expect the --dart-sdk arg to be on it's own followed by the path, rather than all in 1 arg using '='.
I think the --dart-sdk we are seeing is the one added here
Neither of these things has changed in a long time so it's not clear why this is a problem only recently
Worth a bisect? I did verify that it worked with 0.3.2
It's tough to bisect cause it was not working for other reasons recently...
As near as I can tell this started with the SDK upgrade to 1.22
This is a lot harder to debug given that we're using an unmodified SDK zip. Filed https://github.com/dart-lang/rules_dart/issues/117
0.3.4 supports a --local-sdk argument. Hopefully now we can narrow in on the root cause...
Ok, I confirmed that changing this arg to use a space rather than = makes this work.
I have no idea how this surfaced all of a sudden...
WOW! Well...at least we know now.
Found it https://github.com/dart-lang/sdk/commit/e321439470ec016e9532afe57b7f2891c0282d83
Is this a bug, ya think?
Yes, this is a bug in the analyzer.
Should be fixed by https://codereview.chromium.org/2733953005/
So build/serve now runs with https://github.com/dart-lang/sdk/commit/56ad714d6b179839f1ced976bd5d5500f814a482
BUT!

@jacob314 – could you look at this? This is with SDK @ https://github.com/dart-lang/sdk/commit/56ad714d6b179839f1ced976bd5d5500f814a482
Synced up with SDK at https://github.com/dart-lang/sdk/commit/0c23c9229ee80fd15837385970ae3e78ddee4342 and everything is good.
Thanks, @vsmenon
@natebosch should we leave this open until we update rules to latest? ...
Yes I plan on leaving this open until there is a dev release and we are upgraded here