Run dartanalyzer by default.
This changes the dart_packaged_application() template so that it will
run dartanalyzer on each of the source files, and removes the explicit
dartcheck command from mojob.py.
On dart null+1 builds, this adds 3 seconds to the build time. There was
no difference in speed on clean -j100 builds.
BUG=459376
R=sky@chromium.org
Review URL: https://codereview.chromium.org/973363002
diff --git a/BUILD.gn b/BUILD.gn
index 945e123..d23d33e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -24,24 +24,6 @@
}
}
-# A group which invokes the dart checker on each dart package. This can take
-# multiple seconds per target, so we separate it out from the main building.
-# Eventually, we'd like this to be part of the default dart building, but for
-# now, to participate in checking, please add "{package_name}_analyze" to the
-# list of dependencies below.
-group("dartcheck") {
- testonly = true
- deps = [
- "//examples/dart/console_example:console_example_analyze",
- "//examples/dart/hello_world/hello:hello_analyze",
- "//examples/dart/hello_world/world:world_analyze",
- "//examples/dart/wget:wget_analyze",
- "//services/dart/test/echo:echo_analyze",
- "//services/dart/test/pingpong:pingpong_analyze",
- "//services/dart/test/pingpong_target:pingpong_target_analyze",
- ]
-}
-
# Deprecated name for the default build target.
group("root") {
testonly = true
diff --git a/mojo/public/dart/rules.gni b/mojo/public/dart/rules.gni
index e8d7c72..c4552ff 100644
--- a/mojo/public/dart/rules.gni
+++ b/mojo/public/dart/rules.gni
@@ -123,9 +123,7 @@
]
deps = [
- # TODO(erg): When dartanalyze runs at an acceptable speed, add
- # ":$package_analyze_sources" as a dependency here and remove the
- # manual group("check") in the toplevel build file.
+ ":$package_analyze_sources",
":$package_name",
]
if (defined(invoker.deps)) {
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py
index 7f60900..fb9e144 100755
--- a/mojo/tools/mojob.py
+++ b/mojo/tools/mojob.py
@@ -112,14 +112,6 @@
return subprocess.call(['ninja', '-C', out_dir])
-def dartcheck(config):
- """Runs the dart analyzer on code for the given config."""
-
- out_dir = _get_out_dir(config)
- print 'Checking dart code in %s ...' % out_dir
- return subprocess.call(['ninja', '-C', out_dir, 'dartcheck'])
-
-
def _run_tests(config, test_types):
"""Runs the tests of the given type(s) for the given config."""
@@ -252,10 +244,6 @@
help='Run NaCl unit tests (does not build).')
nacltest_parser.set_defaults(func=nacltest)
- dartcheck_parser = subparsers.add_parser('dartcheck', parents=[parent_parser],
- help='Run the dart source code analyzer to check for warnings.')
- dartcheck_parser.set_defaults(func=dartcheck)
-
args = parser.parse_args()
config = _args_to_config(args)
return args.func(config)