build_modules 1.0.7+1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 50

build_modules #

Module builders for web, used by package:build_web_compilers.
Build Status Issues related to build_modules Pub Package Version Latest Dartdocs Join the chat on Gitter

This package provides generic module builders which can be used to create custom web compilation pipelines. It is used by build_web_compilers package which provides standard builders for DDC and dart2js.

Usage #

There should be no need to import this package directly unless you are developing a custom builder for web. See documentation in build_web_compilers for more details on building your Dart code with DDC and dart2js.

1.0.7+1 #

  • Fix broken release by updating dart2js worker and restricting sdk version.

1.0.7 #

  • Explicitly skip dart-ext uris during module creation.
    • Filed Issue #2047 to track real support for native extensions.
  • Run workers with mode detachedWithStdio if no terminal is connected.

1.0.6 #

  • Improved the time tracking for kernel and analyzer actions by not reporting time spent waiting for a worker to be available.

1.0.5 #

  • Increased the upper bound for package:analyzer to <0.36.0.

1.0.4 #

  • Update to package:graphs version 0.2.0.
  • Use dartdevc --kernel instead of dartdevk.

1.0.3 #

  • Increased the upper bound for package:analyzer to <0.35.0.

1.0.2 #

  • Support the latest package:json_annotation.

1.0.1 #

  • Increased the upper bound for package:analyzer to '<0.34.0'.

1.0.0 #

Breaking Changes #

  • The Module constructor has an additional required parameter isSupported, which indicates if a module is supported on that module's platform.

0.4.0 #

Improvements #

  • Modules are now platform specific, and config specific imports using dart.library.* constants are supported.

Breaking Configuration Changes #

  • Module granularity now has to be configured per platform, so instead of configuring it using the build_modules|modules builder, you now need to configure the builder for each specific platform:
targets:
  $default:
    build_modules|dartdevc:
      options:
        strategy: fine

The supported platforms are currently dart2js, dartdevc, flutter, and vm.

Breaking API Changes #

  • Output extensions of builders have changed to include the platform being built for.
    • All the top level file extension getters are now methods that take a platform and return the extension for that platform.
  • Most builders are no longer applied by default, you must manually apply them using applies_builders in your builder.
  • Most builder constructors now require a platform argument.

0.3.2 #

  • Module strategies are now respected for all packages instead of just the root package.
  • Can now mix and match fine and coarse strategies at will, even within package cycles (although this may cause larger modules).
  • Removed analyzer dependency.

0.3.1+1 #

  • Support package:json_annotation v1.

0.3.1 #

  • Change the default module strategy for the root package to coarse.

0.3.0 #

Improvements #

  • Updated dart2js support so that it can do multiple builds concurrently and will restart workers periodically to mitigate the effects of dart-lang/sdk#33708.
  • Increased the upper bound for the sdk to <3.0.0.

Breaking Changes #

  • Removed the kernelSummaryExtension, and renamed the KernelSummaryBuilder to KernelBuilder. The new builder can be used to create summaries or full kernel files, and requires users to give it a custom sdk.
  • Changed metaModuleCleanBuilder to read .module.library files which are produced by the moduleLibrayBuilder. Clients using the automatically generated build script will get this automatically. Clients which have manually written build scripts will need to add it.

0.2.3 #

  • Update to the latest package:scratch_space and don't manually clear it out between builds. This provides significant speed improvements for large projects.

0.2.2+6 #

  • Support the latest package:build_config.

0.2.2+5 #

  • Updated the missing modules message to highlight that the error is likely due to a missing dependency.

0.2.2+4 #

  • Support package:analyzer 0.32.0.

0.2.2+3 #

  • Fix a race condition where we could fail to find the modules for some dependencies.

0.2.2+2 #

  • Fix an issue where modules were unnecessarily being built with DDC. #1375.

0.2.2+1 #

  • Fix an issue with new files causing subsequent build failures #1358.
  • Expose MetaModuleCleanBuilder and metaModuleCleanExtension publicly for usage in tests and manual build scripts.

0.2.2 #

  • Clean up .module and summary files from the output and server.

  • Add new ModuleBuilder strategies. By default the coarse strategy is used for all non-root packages and will create a minimum number of modules. This strategy can not be overridden. However, for the root package, the fine strategy will be used which creates a module for each strongly connected component. You can override this behavior by providing coarse to the strategy option.

    Example configuration:

    targets:
      $default:
        builders:
          build_modules|modules:
            options:
              strategy: coarse
    

0.2.1 #

  • Give a guaranteed reverse dependency order for Module.computeTransitiveDependencies

0.2.0+2 #

0.2.0+1 #

0.2.0 #

  • computeTransitiveDependencies now throws a MissingModulesException instead of logging a warning if it discovers a missing module.

0.1.0+2 #

  • Fix a bug with the dart2js workers where the worker could hang if you try to re-use it after calling terminateWorkers. This only really surfaces in test environments.

0.1.0+1 #

  • Fix a bug with imports to libraries that have names starting with dart.

0.1.0 #

  • Split from build_web_compilers.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  build_modules: ^1.0.7+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:build_modules/build_modules.dart';
  
Version Uploaded Documentation Archive
2.1.3 May 21, 2019 Go to the documentation of build_modules 2.1.3 Download build_modules 2.1.3 archive
2.1.2 Apr 24, 2019 Go to the documentation of build_modules 2.1.2 Download build_modules 2.1.2 archive
2.1.1 Apr 24, 2019 Go to the documentation of build_modules 2.1.1 Download build_modules 2.1.1 archive
2.1.0 Apr 18, 2019 Go to the documentation of build_modules 2.1.0 Download build_modules 2.1.0 archive
2.0.0 Apr 12, 2019 Go to the documentation of build_modules 2.0.0 Download build_modules 2.0.0 archive
1.0.10 Apr 1, 2019 Go to the documentation of build_modules 1.0.10 Download build_modules 1.0.10 archive
1.0.9 Mar 4, 2019 Go to the documentation of build_modules 1.0.9 Download build_modules 1.0.9 archive
1.0.8 Feb 22, 2019 Go to the documentation of build_modules 1.0.8 Download build_modules 1.0.8 archive
1.0.7+2 Feb 14, 2019 Go to the documentation of build_modules 1.0.7+2 Download build_modules 1.0.7+2 archive
1.0.7+1 Feb 14, 2019 Go to the documentation of build_modules 1.0.7+1 Download build_modules 1.0.7+1 archive

All 38 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
92
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
20
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.3.0.
 
 Because build_modules requires SDK version 2.1.0, version solving failed.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and build_modules.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK 2.1.0