Commit Graph

36 Commits

Author SHA1 Message Date
nweiz@google.com edad0a6ed2 Fix a subtle bug in barback.
When a [PhaseOutput.removeListeners] was called, the output was re-added to the [Phase] but its removal event wasn't re-subscribed. This meant that if that output was later removed, the phase got into an inconsistent state where it would perform operations on a removed output.

R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23803006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27170 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 00:13:36 +00:00
nweiz@google.com fb3e580c5c Support loading transformer plugins from pub.
This is still missing some functionality, most notably the ability for
a transformer to import transformed code.

R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23625002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27085 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 00:43:24 +00:00
rnystrom@google.com 193dfd7481 Make Transform a little more pleasant to use:
- Provide the primaryInput asset synchronously (#12515).
- Add convenience methods for reading input assets (#12516).

R=nweiz@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//23543005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26822 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:37:40 +00:00
nweiz@google.com 9300846114 Use filtered stacks in pub, barback, and watcher tests.
This also exposes more unittest stuff to users of scheduled_test.

R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23582003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26751 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 23:13:30 +00:00
nweiz@google.com bec9ac685d Add an AssetStream class to Barback.
This makes it easier to create an asset from a stream of bytes.

R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23469003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26734 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 18:29:31 +00:00
floitsch@google.com 1887b5ca49 Some more removals of dart:utf.
R=jmesserly@google.com, lrn@google.com, nweiz@google.com

Review URL: https://codereview.chromium.org//22909059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26712 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 13:18:34 +00:00
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//22872012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
rnystrom@google.com b35a36dbe5 Normalize incoming AssetID paths.
BUG=https://code.google.com/p/dart/issues/detail?id=12650
R=nweiz@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//22887039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26558 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 21:36:36 +00:00
nweiz@google.com 13ad318db4 Enable cross-package transforms to see new transformers in other packages.
R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23171020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26556 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 21:04:05 +00:00
rnystrom@google.com d922bc34b8 Start sketching out a buildAll() method.
BUG=
R=nweiz@google.com

Review URL: https://codereview.chromium.org//22824023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26452 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 18:09:39 +00:00
nweiz@google.com b56d5196b8 Add the ability to dynamically modify transforms to barback.
R=rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//23311006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26403 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 22:31:41 +00:00
rnystrom@google.com f7d4b3829e Add "allowedExtensions" to Transformer.
BUG=
R=nweiz@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//23050009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26385 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 19:47:15 +00:00
kevmoo@j832.com f1f368d927 pkg/barback: removed unused imports, added a missing import
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//23201013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26330 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 23:29:50 +00:00
nweiz@google.com 97d87db6ed Fix a pass-through bug in barback.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//22852007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26289 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 19:07:35 +00:00
nweiz@google.com ab406948be Support passing barback assets through phases in which they're unused.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//23199004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26220 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 21:06:22 +00:00
nweiz@google.com 6812f7c10a Add more metadata to non-programmatic barback exceptions.
This also adds a BarbackException superclass for errors that come from the
package graph or from transformers.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//22961002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26133 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 18:12:17 +00:00
nweiz@google.com f3b74cb621 Better handling of asset collisions in barback.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//22685006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26042 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 22:25:03 +00:00
nweiz@google.com 5395c1e611 Consistently schedule operations in the barback tests.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//22371005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25978 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 20:35:59 +00:00
nweiz@google.com 12207b384d Support cross-package transforms in barback.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//22265002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25937 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 18:27:44 +00:00
nweiz@google.com 0c7c0765dd Add events in barback to bubble up the dirty bit.
This allows TransformNodes and Phases to notify their AssetCascade that they've
become dirty. This is important for transforms re-running their cascades when
their cross-package imports become dirty.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//21446002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25794 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 20:23:06 +00:00
nweiz@google.com 54a2295fd7 Support an additional edge case in barback.
This adds support for the case where a transform loads an input, then that input
is changed before that transform completes. Previously the change would be
ignored; now the transform will be re-run.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//20625005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25695 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 00:14:41 +00:00
nweiz@google.com f22e9532a6 Move barback to a more event-based model.
The goal of this change is to make it easy to synchronously propagate the dirty
state of an asset node to all of the nodes and transforms that depend on it,
while still asynchronously processing those transforms.

In addition, this refactor ends up addressing two TODOs and one bug:

* If a node has been compiled previously and an unrelated part of its cascade is
  dirtied, it will now be returned immediately rather than waiting for the
  entire cascade to finish processing.

* If a node is consumed as the input of a transform, it will no longer be
  returned by [getAssetById].

* If the contents of a transform's primary input changes such that it's no
  longer a valid primary input for that transform, the transform will be
  removed.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//21275003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25693 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:51:24 +00:00
nweiz@google.com 290b3be3df Fix cancelable_future again.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//21004014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25654 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 00:38:09 +00:00
nweiz@google.com c12a5cad3a Refactor the barback tests somewhat.
This makes each transformer capable of relatively fine-grained pausing
and resuming of processing. They no longer use MockAsset, instead
using [Asset.fromString] to better simulate real-world transformers.

This also adds several new utility functions to
barback/test/utils.dart.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//21226004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25652 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 23:57:16 +00:00
nweiz@google.com 133814b67b Remove calls to [new Future] work around issue 11911.
BUG=11911
R=gram@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org//19841002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25365 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 20:26:04 +00:00
nweiz@google.com b31ce6c8cf Fix a barback bug that triggered when an asset was removed.
If a transform had that asset as its primary input, it would go into an error
state.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//19473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25116 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-17 18:32:11 +00:00
nweiz@google.com 962d3fddb6 Rename several classes in barback.
AssetProvider     -> PackageProvider
AssetGraphManager -> PackageGraph
AssetGraph        -> AssetCascade

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//19402003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25080 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-17 00:34:33 +00:00
nweiz@google.com d28b8251f6 Make barback more package-aware.
This makes AssetGraph package-specific, but doesn't yet support cross-package asset usage.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//5695057915019264

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25079 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 22:56:53 +00:00
rnystrom@google.com a9d24edd0f Rename "pathos" package to "path".
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//18356011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24964 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 17:54:48 +00:00
rnystrom@google.com bfbfc432ca Tweak unittest compact config a bit and don't use it on bots.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//18811008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24924 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 18:34:53 +00:00
nweiz@google.com 5cae6e7aae Split AssetGraph.results into two streams.
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//18178021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24892 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-10 22:15:23 +00:00
rnystrom@google.com 8d8db43bd6 Binary assets and more unit tests for Asset.
R=nweiz@google.com

Review URL: https://codereview.chromium.org//18854007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24848 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 16:25:16 +00:00
rnystrom@google.com c770061ecc Make Assets know their ID.
R=nweiz@google.com

Review URL: https://codereview.chromium.org//18650004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24819 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-08 21:20:43 +00:00
rnystrom@google.com 0886dc6dba Make Asset.readAsString() async.
R=nweiz@google.com

Review URL: https://codereview.chromium.org//18478004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24743 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 19:44:38 +00:00
rnystrom@google.com a3d0f52274 Clean up barback tests.
This defines a more DSL-like API for AssetGraph tests. It also handles
build results more cleanly.

R=nweiz@google.com

Review URL: https://codereview.chromium.org//17507003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24734 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 17:44:14 +00:00
rnystrom@google.com 81e2bed5c5 First pass at build dependency graph for barback.
BUG=
R=nweiz@google.com

Review URL: https://codereview.chromium.org//16854005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24257 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 00:21:53 +00:00