Commit Graph

18 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 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
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 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 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 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