At some point the analyzer code generator for the task dependency
model began depending on summary infrastructure. Therefore we need to
do summary code generation first.
Change-Id: I123c6bf2a1c5e0cb6f72548243955a714c0c763d
Reviewed-on: https://dart-review.googlesource.com/38000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
* The script had stopped working due to a pair of changes in Dart.
First, building Dart no longer produces a packages directory to use
as a package-root.
Second, generated Dart files are now formatted and the formatting
code relies on invoking Dart from the Dart SDK in order to find
dartfmt. (Specifically: invoking Dart from the build directory does
not work because there is no dartfmt there, and invoking Dart via
sdk/bin/dart from the SDK repository does not work because it is a
shell script that invokes Dart from the build directory.)
* Enable the test that the generated summary code has not changed.
* Regenerate the generated summary code.
BUG=
R=paulberry@google.com, whesse@google.com
Review-Url: https://codereview.chromium.org/2997703002 .
BSD systems don't place bash in /bin and a lot of the dart tools
hardcode a #!/bin/bash shebang that fails the 'all' target build
(not able to execute dart2js since the interpreter is not found).
Solve the issue by using #!/usr/bin/env as the shebang. For scripts
that need to pass arguments to bash modify the script to use the set
command as the first executed line of shell.
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org/1552313002 .
This CL reworks the task model grapher (formerly at
pkg/analyzer/tool/task_dependency_graph.dart, now at
pkg/analyzer/tool/task_dependency_graph/generate.dart) so that it
works similarly to the code generation in the analysis server.
Namely, the output file is stored in source control
(pkg/analyzer/tool/task_dependency_graph/tasks.dot), and a test run by
the buildbots verifies that it is up to date. If it is not, the test
outputs the command necessary to update it.
This carries the benefit that:
- Anyone with access to an installation of graphviz can generate the
task model graph easily from its .dot file.
- Any time a change occurs that affects task model dependencies, a
test failure will prompt us that we need to generate a new .dot
file.
- If a change ever occurs that breaks the ability of the task
dependency grapher to produce the graph, a test failure will prompt
us.
The downside is that when making a change that affects task model
dependencies, it is now necessary to re-run the script
pkg/analyzer/tool/task_dependency_graph/generate.dart to avoid a test
failure.
R=brianwilkerson@google.com, scheglov@google.com
Review URL: https://codereview.chromium.org/1408743006 .