Commit Graph

77 Commits

Author SHA1 Message Date
vsmenon 8c336dbfff Update devc.dart 2016-03-31 15:33:14 -07:00
John Messerly 73159b6c1e Remove code that requires whole-program compile
This change removes functionality that is not part of the core Dart Dev
Compiler, in particular those features that were not designed for
incremental/modular compilation.

For a while, the primary way to use DDC will be as a compiler invoked by
a build system, e.g. make or bazel or some node.js based-build system.

We'd love to see the user functionality provided by these return.
In particular, a well designed server+watcher system would be a huge
boost to productivity!

I'll see about moving over HTML reporting to Analyzer CLI. It has a lovely UI.
Thanks to everyone who contributed these features.

The following features were removed:

* DDC transformer. Transformers require whole world, in memory files.
* DDC server. The server has its own mini-build system.
* Various kinds of reporting. These should be moved to Analyzer CLI.

Note: batch compiler and the node runner are left for now.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1788973002 .
2016-03-15 11:30:50 -07:00
vsmenon 72c02ea2f9 Update devc.dart 2016-03-15 10:34:38 -07:00
vsmenon 9586a5d217 Update devc.dart 2016-02-22 15:08:17 -08:00
vsmenon c222c45599 Update devc.dart 2016-02-19 15:04:31 -08:00
vsmenon de5b729e4a Update devc.dart 2016-02-18 16:07:50 -08:00
vsmenon 07fe48f5b9 Update devc.dart 2016-02-12 12:29:24 -08:00
vsmenon 980c580483 Update devc.dart 2016-01-29 10:16:19 -08:00
John Messerly cf6bca8596 Remove library tags, they aren't needed
(with one exception: libs that have parts)

R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1644823002 .
2016-01-29 09:25:34 -08:00
vsmenon 81625ea6b8 Update devc.dart 2016-01-28 15:45:19 -08:00
vsmenon be2c89b28e Update devc.dart 2016-01-13 08:20:37 -08:00
Leaf Petersen 44f2cf3424 Bump the version number and re-baseline codegen/expect
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1569783006 .
2016-01-08 13:29:08 -08:00
vsmenon 4309a4feed Update devc.dart 2015-12-14 10:38:30 -08:00
vsmenon 653371f5de Update devc.dart 2015-11-20 14:15:02 -08:00
Devon Carew 2f3e5e51d6 rev to 0.1.11 2015-11-12 23:23:03 -08:00
Devon Carew 097a0234ee 0.1.10 2015-10-29 06:53:49 -07:00
Vijay Menon ab19094dc8 Remove the checker and corresponding dead code
This is all logic now in the analyzer.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1406983003 .
2015-10-19 14:38:17 -07:00
Devon Carew 7d641d0743 Update version and analysis_options.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1399193002 .
2015-10-12 18:55:52 -07:00
Vijay Menon 2c2a80e587 Update to 0.1.8
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1355043003 .
2015-09-21 15:51:35 -07:00
Devon Carew 318584b4ba add a --version option 2015-09-18 21:39:31 -07:00
Devon Carew 5baea1b7e7 make dev_compiler slightly happier with dartdoc 2015-09-16 18:03:52 -07:00
John Messerly 60aba749ca fixes #219, able to compile multiple entry points
also speeds up codegen_test by reusing the analysis context
BatchCompiler is pretty close to how analyzer_cli works now (other than missing features)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1235503010.
2015-07-16 17:41:33 -07:00
John Messerly b1e92bfcaf simplify computing of runtime file location
R=vsm@google.com

Review URL: https://codereview.chromium.org/1223113005.
2015-07-15 09:58:26 -07:00
John Messerly bc4e0f2a38 fixes #6, refactor to use AnalysisError/Listener throughout dev_compiler
Main goal here was to get rid of the enter/exit compilation unit tracking, to allow further Compiler/Server refactoring. We can get the Uri/LineInfo/contents off Source, which AnalysisError already has
SummaryReporter is now fairly generic.

TODOs for the future:
* figure out what to do about ErrorCodes, in particular dev_compiler prefix feels off.
* skip the intermediate StaticInfo types? They're really just builders now for AnalysisError.
* don't classify all existing messages as "AnalyzerError" ... just print them ...
* skip logger. For our command line program, stdout is part of its "API", IMO it shouldn't use logging for those messages. Consider Pub, which uses stdout/err for its messages, and uses logging for more detailed troubleshooting.

R=pquitslund@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1230903002.
2015-07-10 10:15:08 -07:00
John Messerly b769aa5fbc fixes #25, most analyzer errors were not computed
It helps to call computeErrors ;)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1183733004.
2015-06-15 08:55:59 -07:00
John Messerly 8f4db8f514 expose strong checker API, for use by analyzer_cli
most of the changes here are around making options sane(r), which fixes #204

R=vsm@google.com

Review URL: https://codereview.chromium.org/1174643003.
2015-06-11 07:47:12 -07:00
John Messerly c7b3846d8e fixes detection of SDK libraries
R=vsm@google.com

Review URL: https://codereview.chromium.org/1170813008.
2015-06-10 09:59:18 -07:00
Vijay Menon 4aaeaf6125 Remove dart backend
Fixes #205

R=jmesserly@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1148283010
2015-06-03 14:01:28 -07:00
John Messerly 918ee6636d fixes #187, implicit html, as well as server messages not printing
R=vsm@google.com

Review URL: https://codereview.chromium.org/1136293005
2015-05-19 13:44:31 -07:00
John Messerly 01d39ba3f2 cleanup: simplify creation of AnalysisContext
removes TypeResolver class, introduces function to create analysis context, simplifies a few other things around mock vs real SDK sources.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1143683002
2015-05-18 10:20:29 -07:00
John Messerly f728691ac8 Fixes #179 -- compile error if editing files during server mode
this avoids reloading file contents many times during a compile. `.contents.data` == bad!
also fixes #73, using Analyzer's LineInfo instead of FileSpan to avoid finding line breaks over and over
I did some manual testing on sunflower as well as diffing SDK messages before and after

The one baseline change (23 -> 22) seems more accurate than it was before.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1141013002
2015-05-14 16:42:33 -07:00
Vijay Menon 2749eaa496 Summarize only per logging level
This prunes out INFO messages by default - they end up being a substantial chunk of the payload in server mode.  You can still serve them up by passing '-l ALL' or '-l INFO'.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1126243004
2015-05-14 10:46:35 -07:00
Vijay Menon b013a71e30 Create html if needed in server mode
This allows just serving up a dart file:

dart ./bin/devc.dart --server foo.dart

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1130093007
2015-05-14 09:26:19 -07:00
Sigmund Cherem dfdaff85bb Load time improvements (fixes #140):
- move hash to a query parameter (it works!)
- do widget request later, let app render/loading in case the request is fast
enough.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1131933003
2015-05-12 16:53:32 -07:00
Vijay Menon b5e4a91941 Add flag to disable hashing
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1088703003
2015-04-21 14:52:04 -07:00
Sigmund Cherem fc141ad405 Show message that server is running when it really is
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1088603002
2015-04-13 11:14:02 -07:00
Leaf Petersen 033ab827dc Factor out reporting from rules
This changes the RestrictedTypeRules to eliminate a direct dependency on CheckerReporter.  Instead of logging a missing type error with the reporter directly, it now calls an optional callback.  The Checker registers an appropriate callback for its errors.  Currently the code generators don't log these errors.  This eliminates the dependency of the code generators on the checker reporter.

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1067553004
2015-04-07 09:58:14 -07:00
John Messerly c587869d1d bind to localhost instead of all interfaces, and fix closureWrap
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1022923005
2015-03-20 09:19:10 -07:00
Sigmund Cherem 1b23c0ecb2 Copy resources refered to in the HTML to the output folder
R=vsm@google.com

Review URL: https://codereview.chromium.org/1014173002
2015-03-17 18:54:48 -07:00
Sigmund Cherem c2d0c1b8b9 locating runtime files automatically (fixes #96)
R=vsm@google.com

Review URL: https://codereview.chromium.org/1013363002
2015-03-17 18:52:24 -07:00
John Messerly 07feeb3119 js: fix core.Object, output order, static const fields
These are a few fixes trying to get the compiled SDK to load

R=vsm@google.com

Review URL: https://codereview.chromium.org/1011153002
2015-03-17 13:11:34 -07:00
John Messerly 212b217506 server: create output directory if needed
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1001503003
2015-03-11 12:22:58 -07:00
Sigmund Cherem 6d9564b4ff Support browser caching using hashes in serverMode (fixes #93, fixes #92).
Now the HTML can include a hash in the URL for cachable resources, and the serve knows how to include cache-control headers.

In the process of doing so, I had to change a couple things that made it possible to fix #92 as well (producing different output in the command-line than in server mode).

R=vsm@google.com

Review URL: https://codereview.chromium.org/993213003
2015-03-10 18:27:23 -07:00
Sigmund Cherem 4e4dd98e6b Add widget to display errors, and report graph errors correctly.
This fixes the compiler so that all error messages in dependency_graph are reported via the reporter and unifies how errors are constructed in other places as well. With all errors reported together, we use a widget (adapted from polymer) to display the error messages as part of the app in server mode.

R=vsm@google.com

Review URL: https://codereview.chromium.org/988483006
2015-03-09 11:37:22 -07:00
Sigmund Cherem ca80f2c473 Add JavaScriptSourceNode to represent runtime libraries (fixes #85)
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/986723002
2015-03-09 11:33:46 -07:00
Sigmund Cherem 0991bea1ef Allow changing a file from a part to a library, and viceversa.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/983553002
2015-03-09 10:59:18 -07:00
John Messerly 6e824067a3 rename ddc -> dev_compiler, fixes #84
R=sigmund@google.com

Review URL: https://codereview.chromium.org/967933005
2015-03-04 11:12:19 -08:00
Sigmund Cherem 7dd29efd8f Initial cut for a development server
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/973433003
2015-03-04 09:40:06 -08:00
Sigmund Cherem f7b7f43d28 Fixing layout in js output (use full paths rather than just the library name)
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/968273002
2015-03-03 09:05:09 -08:00
John Messerly 4d7aa8e397 add source maps support, fixes #50
R=sigmund@google.com

Review URL: https://codereview.chromium.org/965033002
2015-02-27 15:17:19 -08:00