Closed
Description
If I swap the snippets tool in Flutter's repo with the following "slow_command
"script:
#!/bin/bash
# Runs slowly because it never gets snapshotted.
dart /home/gspencer/code/flutter/dev/snippets/lib/main.dart "$@"
by using this config:
# This file is used by dartdoc when generating API documentation for Flutter.
dartdoc:
# Before you can run dartdoc, the snippets tool needs to have a snapshot built.
# The dev/tools/dartdoc.dart script does this automatically.
tools:
snippet:
command: ["slow_command", "--type=snippet"]
description: "Creates sample code documentation output from embedded documentation samples."
sample:
command: ["slow_command", "--type=sample"]
description: "Creates full application sample code documentation output from embedded documentation samples."
dartpad:
command: ["slow_command", "--type=sample", "--dartpad"]
description: "Creates full application sample code documentation output from embedded documentation samples and displays it in an embedded DartPad."
errors:
# Default errors of dartdoc:
- duplicate-file
- invalid-parameter
- no-defining-library-found
- tool-error
- unresolved-export
# Warnings that are elevated to errors:
- ambiguous-doc-reference
- ambiguous-reexport
- broken-link
- category-order-gives-missing-package-name
- deprecated
- ignored-canonical-for
- missing-from-search-index
- no-canonical-found
- no-documentable-libraries
- no-library-level-docs
- not-implemented
- orphaned-file
- reexported-private-api-across-packages
# - unknown-directive # Disabled due to https://github.com/dart-lang/dartdoc/issues/2353
- unknown-file
- unknown-macro
- unresolved-doc-reference
Then it seems to run out of control, and I can get my load average up to >1000:
This doesn't happen if I keep the regular flutter config that runs a snapshotted version of the same script.
I'm trying to convert the snippet tool over to be run using pub global run
from a package, and the lack of throttling is preventing that. I know that there is throttling code, but I just don't think it's working for non-dart tools.