dev_compiler 0.1.24

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 22

dev_compiler

Build Status Coverage Status

The Dart Dev Compiler (DDC) is an experimental development tool and transpiler. It is at a very early stage today. Its aims include the following:

  • A static checker based on stricter-than-standard-Dart type rules.
  • A modular Dart-to-ES6 transpiler for Dart programs that statically check.

DDC attempts to map to idiomatic EcmaScript 6 (ES6) as cleanly as possible. To do this while cohering to Dart semantics, DDC relies heavily on static type information, static checking, and runtime assertions.

DDC is intended to support a very large subset of Dart. If a program does not statically check, DDC will not result in valid generated code. Our goal is that a program execution (of a valid program) that runs without triggering runtime assertions should run the same on other Dart platforms under checked mode or production mode.

DDC does support untyped Dart code, but it will typically result in less readable and less efficient ES6 output.

DDC has the following project goals:

  • Effective static checking and error detection.
  • A debugging solution for all modern browsers.
  • Readable output.
  • Fast, modular compilation of Dart code.
  • Easy use of generated code from JavaScript.

DDC is still in a very early stage as highlighted by our choice of ES6. ES6 itself is in active development across all modern browsers, but at various stages of support: kangax.github.io/compat-table/es6.

We are targeting the subset of ES6 supported in Chrome.

To try out DDC and/or give feedback, please read our usage page.

dev_compiler changelog

0.1.24

  • workaround breaking change on requestAnimationFrame

0.1.23

  • updates for the latest analyzer
  • removal of deprecated functionality (server mode) in prep for refactoring

0.1.22

  • fixes to support the latest analyzer
  • improvements in compile speed
  • bug fixes on function / closure handling

0.1.21

  • bug fix for dart:js constructor invocation

0.1.20

  • support new StackTrace.current method

0.1.19

  • support for dom libraries (dart:html, etc)

0.1.18

  • dart:typed_data support
  • preliminary TS / Closure output support
  • various runtime typing fixes

0.1.17

  • preliminary node module support
  • support for compiling / serving multiple html files

0.1.16

  • rolled analyzer to 0.27.2-alpha.1
  • fixes for static fields

0.1.15

  • codegen fixes for dart:convert (json decode) and dart:math (max, min)

0.1.14

  • updates to unpin analyzer and move forward to ^0.27.1+2

0.1.13

  • various fixes in js codegen
  • pinned to analyzer 0.26.2+1 to avoid breaking upstream changes

0.1.12

  • fixes for babel
  • fixes toward new js interop

0.1.11

  • moved js runtime files to lib/runtime/dart (dart_runtime.js -> dart/_runtime.js)
  • bug fix to source maps
  • initial support for f-bound quantification patterns

0.1.10

  • added an --html-report option to create a file summarizing compilation issues
  • added a -f alias to the --force-compile command line option
  • removed many info level messages that were informational to the DDC team

0.1.9

0.1.8

  • added a --version command-line option
  • added a new entry-point - dev_compiler - that aliases to dartdevc

1. Depend on it

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


dependencies:
  dev_compiler: "^0.1.24"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:dev_compiler/devc.dart';
        
Version Uploaded Documentation Archive
0.1.24 Apr 1, 2016 Go to the documentation of dev_compiler 0.1.24 Download dev_compiler 0.1.24 archive
0.1.23 Mar 31, 2016 Go to the documentation of dev_compiler 0.1.23 Download dev_compiler 0.1.23 archive
0.1.22 Mar 15, 2016 Go to the documentation of dev_compiler 0.1.22 Download dev_compiler 0.1.22 archive
0.1.21 Feb 22, 2016 Go to the documentation of dev_compiler 0.1.21 Download dev_compiler 0.1.21 archive
0.1.20 Feb 19, 2016 Go to the documentation of dev_compiler 0.1.20 Download dev_compiler 0.1.20 archive
0.1.19 Feb 19, 2016 Go to the documentation of dev_compiler 0.1.19 Download dev_compiler 0.1.19 archive
0.1.18 Feb 12, 2016 Go to the documentation of dev_compiler 0.1.18 Download dev_compiler 0.1.18 archive
0.1.17 Jan 29, 2016 Go to the documentation of dev_compiler 0.1.17 Download dev_compiler 0.1.17 archive
0.1.16 Jan 28, 2016 Go to the documentation of dev_compiler 0.1.16 Download dev_compiler 0.1.16 archive
0.1.15 Jan 13, 2016 Go to the documentation of dev_compiler 0.1.15 Download dev_compiler 0.1.15 archive

All 26 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
68 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
10 / 100
Overall score:
Weighted score of the above. [more]
22

Platforms

Detected platforms: Flutter, other

Platform components identified in package: io.

Suggestions

  • Fix lib/src/analysis_context.dart.

    Strong-mode analysis of lib/src/analysis_context.dart failed with the following error:

    line: 30 col: 23
    No setter named 'strongMode' in class 'AnalysisOptions'.

  • Fix lib/src/codegen/js_codegen.dart.

    Strong-mode analysis of lib/src/codegen/js_codegen.dart failed with the following error:

    line: 24 col: 8
    Target of URI doesn't exist: 'package:analyzer/src/task/strong/info.dart'.

  • Fix further 8 Dart files.

    Similar analysis of the following files failed:

    • lib/src/codegen/js_interop.dart
    • lib/src/codegen/module_builder.dart
    • lib/src/codegen/reify_coercions.dart
    • lib/src/codegen/side_effect_analysis.dart
    • lib/src/dart_sdk.dart
    • lib/src/js/type_printer.dart
    • lib/src/js/printer.dart
    • lib/src/js/nodes.dart
  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dev_compiler.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

    analyzer:
      strong-mode: true
    

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.12.0 <2.0.0
analyzer ^0.27.3-alpha.5 0.27.6 0.31.1
args ^0.13.0 0.13.7 1.3.0
cli_util ^0.0.1 0.0.1+2 0.1.2+1
func ^0.1.0 0.1.1 1.0.0
html ^0.12.0 0.12.2+2 0.13.2+2
js ^0.6.0 0.6.1
logging >=0.9.2 <0.12.0 0.11.3+1
path ^1.3.0 1.5.1
pub_semver ^1.1.0 1.3.2
shelf >=0.5.6 <0.7.0 0.6.8 0.7.2
shelf_static ^0.2.1 0.2.7
source_maps ^0.10.0 0.10.4
source_span ^1.0.2 1.4.0
yaml ^2.1.2 2.1.13
Transitive dependencies
async 1.13.3 2.0.4
charcode 1.1.1
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.13.7+1 0.14.1
glob 1.1.5
http_parser 3.1.1
isolate 0.2.3 1.1.0
mime 0.9.6
package_config 1.0.3
plugin 0.2.0+2
stack_trace 1.9.2
stream_channel 1.6.3
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
when 0.2.0
which 0.1.3
Dev dependencies
dart_style 0.2.4
test ^0.12.0
webdriver ^0.8.8