dart2js_info.deferred_library_check library

This tool checks that the output from dart2js meets a given specification, given in a YAML file. The format of the YAML file is:

main:
  include:
    - some_package
    - other_package

foo:
  include:
    - foo
    - bar

baz:
  include:
    - baz
    - quux
  exclude:
    - zardoz

The YAML file consists of a list of declarations, one for each deferred part expected in the output. At least one of these parts must be named "main"; this is the main part that contains the program entrypoint. Each top-level part contains a list of package names that are expected to be contained in that part, a list of package names that are expected to be in another part, or both. For instance, in the example YAML above the part named "baz" is expected to contain the packages "baz" and "quux" and not to contain the package "zardoz".

The names for parts given in the specification YAML file (besides "main") are the same as the name given to the deferred import in the dart file. For instance, if you have import 'package:foo/bar.dart' deferred as baz; in your dart file, then the corresponding name in the specification file is 'baz'.

Classes

ManifestComplianceFailure

Functions

checkDeferredLibraryManifest(AllInfo info, Map manifest) → List<ManifestComplianceFailure>