build_web_compilers 4.3.0
build_web_compilers: ^4.3.0 copied to clipboard
Builder implementations wrapping the dart2js and DDC compilers.
4.3.0 #
- When both wasm and js builds are enabled you can now add force_js=true to the URL in your browser to load the js build.
4.2.4 #
- Allow Dart SDK 3.10.x and 3.11 prerelease.
4.2.3 #
- Allow
build4.0.0.
4.2.2 #
- Documentation revamp.
4.2.1 #
- Remove unused deps:
build_config. - Allow
analyzer8.0.0.
4.2.0 #
- Allow
build3.0.0.
4.1.6 #
- Allow Dart SDK 3.9.x and 3.10 prerelease.
4.1.5 #
- Remove dependency on the deprecated
package:js.
4.1.4 #
- Allow Dart SDK 3.8.x and 3.9 prerelease.
4.1.3 #
- Fixed WebAssembly detection logic.
4.1.2 #
- Bump the min SDK to 3.7.0.
- Use
build_test3.0.0. - Use support-detection scripts emitted by
dart2wasm.
4.1.1 #
- Support 3.8.0 pre-release sdks.
4.1.0 #
- Support package:archive version 4.x.
- Allow analyzer version 7.x.
- Bump the min sdk to 3.6.0.
4.1.0-beta.3 #
- Support 3.7.0 pre-release sdks.
4.1.0-beta.2 #
- Add source maps for dart2wasm builds.
4.1.0-beta.1 #
- Fix loading compiled modules from subdirectories.
- Stop using deprecated wasm loader functions.
4.1.0-beta.0 #
- Support compiling to WebAssembly by using
dart2wasmas a value for the compiler option. - Support compiling with multiple compilers (e.g.
dart2jsanddart2wasm) with a newcompilersoption. - Account for dartdevc snapshot in the Dart SDK changing to an AOT snapshot.
- Bump the min sdk to 3.6.0-165.0.dev.
4.0.11 #
- Bump the min sdk to 3.5.0-259.0.dev.
- Allow version 3.6.x of the Dart SDK.
4.0.10 #
- Allow version 3.5.x of the Dart SDK.
4.0.9 #
- Support latest version of
package:js. - Allow
dart:_js_annotationson web platforms.
4.0.8 #
- Allow version 3.4.x of the Dart SDK.
4.0.7 #
- Support
dart:js_interop_unsafe. - Require Dart 3.1 or greater.
4.0.6 #
- Allow version 3.3.x of the Dart SDK.
4.0.5 #
- Allow version 3.2.x of the Dart SDK.
4.0.4 #
- Allow the latest analyzer (6.x.x).
- Add the
canaryoption forbuild_web_compilers:ddcandbuild_web_compilers:sdk_jsbuilders to enable canary features in DDC. This setting is disabled by default but can be enabled by setting it totrueglobally:
global_options:
build_web_compilers:ddc:
options:
canary: true
build_web_compilers:sdk_js:
options:
canary: true
4.0.3 #
- Support Dart 3.1 releases.
4.0.2 #
- Allow the compiler to choose the default for the native null assertions option when one is not explicitly provided.
4.0.1 #
- Add support for
dart:js_interop.
4.0.0 #
- Require Dart 3.0.
- Drop support for unsound null safety.
- Drop support for null asserts (irrelevant with sound null safety).
- Mention JSON formatting in error message about dart2js args.
3.2.7 #
- Migrate off deprecated analyzer apis.
- Update min sdk constraint to 2.18.0.
- Expand the pubspec description.
3.2.6 #
- Allow the latest
package:analyzer.
3.2.5 #
- Use a standalone process to compile the ddc sdk.js file.
3.2.4 #
- Use
dart compile jsinstead of running dart2js from its sdk snapshot.
3.2.3 #
- Allow analyzer 4.x.
3.2.2 #
- Allow the latest analyzer.
3.2.1 #
- Fix enable-experiment flag support for dartdevc to also pass experiment flags to dartdevc as well as kernel.
- Add deprecation warning for the old
experimentsconfig. - Update
pub runreferences todart run. - Fix
doctorcommand warnings for this package.
3.2.0 #
- Allow analyzer version 2.x.x.
3.1.0 #
- Add the
emit-debug-symbolsoption for thebuild_web_compilers:ddcbuilder. The debug symbols output is used by the debugger in webdev for variable inspection. This setting is disabled by default but can be enabled by setting it totrueglobally:
global_options:
build_web_compilers:ddc:
options:
emit-debug-symbols: true
- Update min SDK constraint to 2.14.0-216.0.dev
3.0.0 #
- Migrate to null safety.
- Update to the latest
build_modules. - Drop support for
skipPlatformCheckPackages.
2.16.5 #
- Update to build
2.x. - Update to scratch_space
1.x.
2.16.4 #
- Update analyzer to
1.x. - Update glob to
2.x.
2.16.3 #
- Allow the null safety pre-release of
bazel_worker.
2.16.2 #
- Allow the null safety pre-release of
logging.
2.16.1 #
- Allow the latest archive version
3.x.x.
2.16.0 #
- Enable native null assertions by default.
2.15.3 #
- Allow the latest analyzer version
0.41.x.
2.15.2 #
- Fix stack trace mapping for sound mode DDC tests and dart2js apps.
2.15.1 #
- Fix DDC sound mode apps to load the sound mode sdk, and only require the compiled sdk dependency that it will actually use.
2.15.0 #
- Add some warnings for manual dart2js args that should be configured using explicit options, and add back dart2js argument logging which was accidentally removed.
2.14.0 #
- Strip scratch directory paths from a new metadata field
fullKernelUri.
2.13.0 #
- Add
native_null_assertsboolean option to thebuild_web_compilers:entrypointbuilder. This is disabled by default but will be enabled by default in a later release.
2.12.3 #
- Fix handling of explicit
sound_null_safetyoption fordart2jscompiles.
2.12.2 #
- Fix parsing of
environmentconfig for DDC when using a bool or numeric value. - Add
sound_null_safetyandnull_assertionsboolean options to thebuild_web_compilers|entrypointbuilder.
2.12.1 #
- Require
build_modulesversion^3.0.0.
2.12.0 #
- Support sound null safety in ddc/dart2js, based on the standard entrypoint detection (enable null safety if the entrypoint opts in).
- Update dart2js support to enable experiments if provided, and use a multi-root scheme for non-package uris.
- Require
buildversion>=1.5.0.
2.12.0-dev.3 #
- Fix stripping scratch paths in metadata.
2.12.0-dev.2 #
- Add the
generate-full-dilloption for thebuild_web_compilers:ddcbuilder. The full dill output is used by expression evaluation service in webdev for expression evaluation feature. This setting is disabled by default but can be enabled by setting it totrueglobally:
global_options:
build_web_compilers:ddc:
options:
generate-full-dill: true
2.12.0-dev.1 #
- Update
build_web_compilers|ddcbuilder to produce a.metadatafile. - Update
build_web_compilers|entrypointbuilder to produce a.ddc_merged_metadatafile which consists of new line separated.metadatacontent produced by DDC. - Migrate off of deprecated analyzer apis.
- Allow the latest analyzer version
0.40.x.
2.11.0 #
- Deprecated support for the
experimentsconfiguration in favor of the general mechanism exposed by the build package(exposed through the--enable-experimentflag to match other Dart tools).
2.10.0 #
- Pass the package_config.json file when compiling with ddc/dart2js instead of the .packages file.
2.9.0 #
- Add support for enabling experiments through the
experimentsoption on thebuild_web_compilers|ddcbuilder. This must be configured globally.- This is a list of experiment names, which translates into
--enable-experiment=<name>arguments.
- This is a list of experiment names, which translates into
2.8.0 #
- Enable asserts in dev mode with dart2js by default.
2.7.1 #
- Allow analyzer version
0.39.x.
2.7.0 #
- Added an
environmentoption to theDevCompilerBuilder.- This can be configured using the
environmentoption of thebuild_web_compilers|ddcbuilder. - The expected value is a
Map<String, String>and is equivalent to providing-D<key>=<value>command line arguments. - This option should only be set globally, and will throw if it ever recieves two different values. This is to ensure all modules are compiled with the same environment.
- This can be configured using the
2.6.4 #
- Deobfuscate DDC extension method stack traces.
2.6.3 #
- Enforce builder application ordering between the SDK JS copy builder and the DDC entrypoint builder.
2.6.2 #
Fix the skipPlatformCheck option which was accidentally doing the opposite of what it claimed.
2.6.1 #
- Use the kernel version of
dart_sdk.jsrather than the analyzer version.
2.6.0 #
Add an option to globally skip the platform checks instead of only skipping them for a set of allowed packages.
2.5.2 #
Republish of 2.5.0 with the proper min sdk contraint.
2.5.1 #
Bug fix for issue #2464 #
Ignore the trackUnusedInputs option that was added in 2.5.0.
This option will be respected again in the next release which will have the proper minimum sdk constraint.
2.5.0 #
Add support for dependency pruning to the DevCompilerBuilder. This should
greatly improve the invalidation semantics for builds, meaning that less code
will be recompiled for each edit you make.
This is enabled by default when using build_runner, and can be disabled using
the track-unused-inputs: false option if you run into issues, so in your
build.yaml it would look like this:
targets:
$default:
build_web_compilers:ddc:
options:
track-unused-inputs: false
When using the builder programatically it is disabled by default and can be
enabled by passing trackUnusedInputs: true to the DevCompilerBuilder
constructor.
2.4.1 #
Make the required assets for DDC applications configurable in the
bootstrapDdc method instead of hard coded. This allows custom integrations
like flutter web to not require the same assets, or require additional custom
assets.
2.4.0 #
New Feature: Better --build-filter support for building a single test. #
You can now build a basic app or test in isolation by only requesting the
*.dart.js file using a build filter, for example adding this argument to any
build_runner command would build the web/main.dart app only:
--build-filter=web/main.dart.js.
For tests you will need to specify the bootstrapped test file, so:
--build-filter=test/hello_world.dart.browser_test.dart.js.
Previously you also had to explicitly require the SDK resources like:
--build-filter="package:build_web_compilers/**.js" or similar.
Note: If your app relies on any non-Dart generated files you will likely have to ask for those explicitly as well with additinal filters.
2.3.0 #
- Add an option to the DDC bootstrap to skip the checks around modules that have
imports to unsupported SDK libraries like
dart:iowhen the module is from a specified package. This is not used in the default build, but is available for custom DDC integrations.
2.2.3 #
- Allow analyzer version 0.38.0.
2.2.2 #
- Re-publish 2.2.0 with proper minimum sdk constraint of >=2.4.0.
2.2.1 #
- Revert of bad 2.2.0 release (had a bad min sdk).
2.2.0 #
- Make
librariesPathconfigurable inDevCompilerBuilder.
2.1.5 #
- Add pre-emptive support for an upcoming breaking change in ddc around entrypoint naming.
2.1.4 #
- Allow analyzer version 0.37.0.
2.1.3 #
- Improve error message when
dart2js_argsis configured improperly.
2.1.2 #
- Fix hot restart bootstrapping logic for dart scripts that live in a different directory than the html file.
2.1.1 #
- Prepare for source map change from dartdevc, don't modify relative paths in source maps.
- Fix hot reload bootstrap logic for app entrypoints under lib.
2.1.0 #
- Make
platformSdk,sdkKernelPath, andplatformconfigurable inDevCompilerBuilder.
2.0.2 #
- Prepare for the next sdk release, which changes what the uris look like for non-package sources, and breaks our existing hot restart logic.
2.0.1 #
- Fix issue #2269, which could cause applications to fail to properly bootstrap.
- Skip compiling modules with ddc when the primary source isn't the primary input (only shows up in non-lazy builds - essentially just tests).
2.0.0 #
Major Update - Switch to use the common front end. #
In this release, the Dart front end for the dev_compiler is changing from the
analyzer to the common front end. This should unify error
messages and general consistency across platforms, as this was one of the last
compilers left still using the analyzer as a front end.
While this is intended to be a transparent change, it is likely that there will be unintended differences. Please file issues if you experience something that seems broken or not working as intended.
Major Update - Auto-detection of web support for applications #
Previously, all files with a main that were matched by the input globs would
attempt to compile for the web. This caused an issue when there were non-web
applications in the default directories, which specifically happens a lot in the
test directory. Resolving this required custom globs in build.yaml files.
Two changes were made to help handle this issue more gracefully, in a way that
often doesn't require custom build.yaml files any more.
- Before compiling any app, build_web_compilers will check that all its
transitive modules are compatible with the web (based on their
dart:imports).- Today we will log a warning message for any app that isn't compatible, as
ultimately it is most efficient to exclude these using globs in your
build.yamlthan waiting for us to detect it. This may change based on feedback.
- Today we will log a warning message for any app that isn't compatible, as
ultimately it is most efficient to exclude these using globs in your
- Changed the default glob for the
testdirectory to only include thetest/**.dart.browser_test.dartfiles (other dirs remain unchanged).- Note that as a result of this, serving the
testdir and running tests that way no longer works, as those entrypoints won't be compiled. You would need to configure thegenerate_forto explicitly includetest/**_test.dartto restore that functionality (we will continue pushing on this in the future though to restore similar functionality). - Also note that the
build_testpackage will now output<platform>_test.dartfiles based on your TestOn annotations, so using those where possible will help reduce build platform support warnings as well.
- Note that as a result of this, serving the
Additional Notes #
- Update to run DDC in kernel mode, and consume kernel outlines instead of analyzer summaries.
- Skip trying to compile apps that import known incompatible libraries.
- Increased the upper bound for
package:analyzerto<0.37.0. - Removed support for
build_root_app_summaryconfiguration option. - Combine the
ddc_kernelandddcworkers under a single name (ddc). - By default only
.dart.browser_test.dartfiles will be compiled under thetestdirectory, instead of all_test.dartfiles.- If you used the previous test debugging workflow in the browser you can restore the old behavior with something like the following in your build.yaml:
targets:
$default:
builders:
build_web_compilers|entrypoint:
generate_for:
- test/**_test.dart
- web/**.dart
- Added the
use-incremental-compileroption for thebuild_web_compilers:ddcbuilder. This is enabled by default but can be disabled if running into build issues by setting it tofalseglobally:
global_options:
build_web_compilers:ddc:
options:
use-incremental-compiler: false
- This package now makes its own copy of the
dart_sdk.jsandrequire.jsfiles, which it deletes during production builds.- In a future build_runner release we will be deleting the entire
$sdkpackage to resolve some issues with build output bloat. - If you are using
dartdevcas your production compiler, you will need to disable the cleanup builder inbuild.yaml(globally) like this:
- In a future build_runner release we will be deleting the entire
global_options:
build_web_compilers|sdk_js_cleanup:
release_options:
enabled: false
1.2.2 #
- Allow build_config 0.4.x.
1.2.1 #
- Allow analyzer version 0.36.x.
1.2.0 #
- Add a marker to inject code before the application main method is called.
- During a hot restart we will now clear all statics before re-invoking main.
1.1.0 #
- Output a
.digestsfile which contains transitive digests for an entrypoint.
1.0.2 #
- Improved the time tracking for ddc actions by not reporting time spent waiting for a worker to be available.
1.0.1 #
- Increased the upper bound for
package:analyzerto<0.36.0.
1.0.0 #
- Removed the
enable_sync_asyncandignore_cast_failuresoptions for thebuild_web_compilers|entrypointbuilder. These will no longer have any effect and will give a build time warning if you try to use them.
0.4.4+3 #
- Increased the upper bound for
package:analyzerto<0.35.0.
0.4.4+2 #
- Support
package:analyzerversion0.33.x.
0.4.4+1 #
- Support
package:build_modulesversion1.x.x.
0.4.4 #
- Track performance of different builder stages.
0.4.3+1 #
- Removed dependency on cli_util.
- Fix error in require.js error handling code
0.4.3 #
- Only call
window.postMessageduring initialization if the current context is aWindow. - Fixed an error while showing stack traces for DDC generated scripts
when
<base>tag is used. - Value of
<base href="/.../">tag should start and end with a/to be used as the base url for require js. - Added more javascript code to dev bootstrap for hot-reloading support
- Support the latest build_modules.
0.4.2+2 #
- Add magic comment marker for build_runner to know where to inject
live-reloading client code. This is only present when using the
dartdevccompiler. (reapplied)
0.4.2+1 #
- Restore
newkeyword for a working release on Dart 1 VM.
0.4.2 #
- Add magic comment marker for build_runner to know where to inject
live-reloading client code. This is only present when using the
dartdevccompiler. - Release broken on Dart 1 VM.
0.4.1 #
- Support the latest build_modules, with 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.
- Improvements to reduce the memory usage of the dart2js builder, so that transitive dependency information can be garbage collected before the dart2js compile is completed.
- Increased the upper bound for the sdk to
<3.0.0.
0.4.0+5 #
- Fixed an issue where subdirectories with hyphens in the name weren't bootstrapped properly in dartdevc.
0.4.0+4 #
- Expand support for
package:build_configto include version0.3.x.
0.4.0+3 #
- Expand support for
package:archiveto include version2.x.x.
0.4.0+2 #
- Fix a dart2 error.
0.4.0+1 #
- Support
package:analyzer0.32.0.
0.4.0 #
- Changed the default for
enable_sync_asynctotruefor thebuild_web_compilers|entrypointbuilder. - Changed the default for
ignore_cast_failurestofalsefor thebuild_web_compilers|entrypointbuilder.
0.3.8 #
- Remove
.dartsources and.js.mapfiles from the output directory in release mode. - Clean up
.tar.gzoutputs produced byDart2Js. - Don't output extra
Dart2Jsoutputs other than deferred part files. - Fixed a logical error in
dartdevccompiler to detect correct base url for require js. - Added a
enable_sync_asyncoption to thebuild_web_compilers|entrypointbuilder, which defaults tofalse.
0.3.7+3 #
- The
dartdevccompiler now respects the<base href="/....">tags and will set them as the base url for require js.
0.3.7+2 #
- Fix sdk stack trace folding in the browser console and package:test.
0.3.7+1 #
- Add missing dependency on the
poolpackage.
0.3.7 #
- Reduce memory usage by requesting (and lazily building) lower level modules first when building for an entrypoint.
0.3.6 #
- Add support for compiling with
dart2jsby default in release mode.
0.3.5 #
- Don't ignore cast failures by default. We expect most code to be clean with cast failures, and the option can be manually enabled with config.
0.3.4+2 #
- Create
.packagesfile and use the new frontend withdart2js.
0.3.4+1 #
- Use
--use-old-frontendwithdart2jsas a stopgap until we can add support for.packagesfiles.
0.3.4 #
- Added support for dart2js deferred loading.
- Added support for bootstrapping code in web workers with
dartdevc.
0.3.3 #
- Added support for
--dump-infoand thedart2jscompiler. If you pass that argument withdart2js_argsthe.info.jsonfile will be copied the output.
0.3.2 #
- Dart2JS now has minification (
--minify) enabled by default, similar to how it worked inpub build. If you are adding customdart2jsoptions, make sure you still keep the--minifyflag. Here is an example:
targets:
$default:
builders:
build_web_compilers|entrypoint:
generate_for:
- web/**.dart
options:
compiler: dart2js
dart2js_args:
- --fast-startup
- --minify
- --trust-type-annotations
- --trust-primitives
0.3.1 #
- Cast failures will now be ignored in dartdevc by default (these were enabled
in the latest sdk), and added an
ignore_cast_failuresoption to thebuild_web_compilers|entrypointbuilder which you can set totrueto enable them.- At some point in the future it is expected that the default for this will flip.
0.3.0+1 #
- Fixed an issue with
dart2jsand the--no-source-mapsflag.
0.3.0 #
Breaking changes #
- Split
ModuleBuilder,UnlinkedSummaryBuilderandLinkedSummaryBuilderinto a separatebuild_modulespackage.
0.2.1+1 #
- Support the latest
analyzerpackage.
0.2.1 #
- All dart files under
testare now compiled by default instead of only the_browser_test.dartfiles (minus vm/node test bootstrap files). This means the original tests can be debugged directly (prior to package:test bootstrapping). - Updated to
package:buildversion0.12.0.
0.2.0 #
New Features #
- Added support for
dart2js. This can be configured using the top levelcompileroption for thebuild_web_compilers|entrypointbuilder. The supported options aredartdevc(the default) anddart2js. Args can be passed todart2jsusing thedart2js_argsoption. For example:
targets:
<my_package>:
builders:
build_web_compilers|entrypoint:
options:
compiler: dart2js
dart2js_args:
- --minify
Breaking Changes #
- Renamed
ddc_bootstrapbuilder toentrypoint, the exposed class also changed fromDevCompilerBootstrapBuildertoWebEntrypointBuilder. - Renamed
jsBootstrapExtensiontoddcBootstrapExtensionsince it is only required when using the dev compiler.
0.1.1 #
- Mark
ddc_bootstrapbuilder withbuild_to: cache. - Publish as
build_web_compilers
0.1.0 #
- Add builder factories.
- Fixed temp dir cleanup bug on windows.
- Enabled support for running tests in --precompiled mode.
0.0.1 #
- Initial release with support for building analyzer summaries and DDC modules.