Commit Graph

57 Commits

Author SHA1 Message Date
rnystrom@google.com ec4b205d80 Fewer iterations in barback test. Was timing out.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31119 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 00:38:40 +00:00
rnystrom@google.com cafdac012d Don't limit transformer parallelism in barback.
BUG=https://code.google.com/p/dart/issues/detail?id=15615
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31113 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 22:10:46 +00:00
whesse@google.com 6538374fe3 Increase barback scheduled_test timeout for many_parallel_transformers test.
BUG=dartbug.com/15483

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30978 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 08:43:59 +00:00
rnystrom@google.com fe1c97ddf4 Pass logs through transformer groups.
BUG=https://code.google.com/p/dart/issues/detail?id=15189
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30963 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 20:23:03 +00:00
nweiz@google.com 88124b3f81 Serialize barback assets more efficiently.
This adds an [InternalAsset] class to barback that supports serialization
operations, and specializes those operations for each asset type (for example,
FileAssets will just send the file path across isolates). This class isn't
exposed publicly, but pub imports it and uses it to handle asset serialization.

BUG=14430
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30126 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 22:14:03 +00:00
nweiz@google.com 20d5b12c33 Revise several already-committed CLs.
R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29707 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 21:50:54 +00:00
rnystrom@google.com af0326f92c Fix barback test.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29693 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:25:34 +00:00
rnystrom@google.com 810915f01a Pass in "mode" to transformer plugins.
BUG=https://code.google.com/p/dart/issues/detail?id=14538
R=nweiz@google.com, sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29690 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:04:27 +00:00
jmesserly@google.com 489f51a41b fix barback and polymer build warnings
R=nweiz@google.com, sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29631 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:41:01 +00:00
nweiz@google.com c2790caa6a Avoid sending needless data between isolates in "pub serve" and "pub build"
Previously when passing barback assets between isolates, pub would eagerly send
the entire contents of the asset. Now it waits to do so until some code actually
subscribes to the asset's data stream.

BUG=14430
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29408 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 00:18:19 +00:00
nweiz@google.com 5589f499fa Don't return outputs from a removed PhaseInput.
Also clean up a few things in Phase.

R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29127 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:19:15 +00:00
nweiz@google.com 7449f31f8d Fix a synchrony bug in barback.
Barback was assuming that certain Future operations were synchronous when in
fact they were not (issue 14323). This caused behavioral bugs in situations with
high input churn. Specifically, barback would attempt to use the synchronous
Future operations to guarantee that no changes happened between a condition
being checked and that condition being reported to the user. Since the Future
operations were not in fact synchronous, such changes were possible.

This change works around the issue by using a manual callback-passing style in
places where synchrony is important and Futures would otherwise be used.

R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29103 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 17:54:58 +00:00
nweiz@google.com 794dc9d0d9 Only run at most 10 transformers at once in barback.
BUG=14320
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29060 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 04:13:41 +00:00
kevmoo@j832.com 7802e835ae fix for Set.add tweak in r28863
R=blois@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28866 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 17:54:21 +00:00
rnystrom@google.com bd4f848856 Use file pool to handle running out of file descriptors.
BUG=https://code.google.com/p/dart/issues/detail?id=13752

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28702 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 00:59:47 +00:00
nweiz@google.com 999840c105 Track the original assets more efficiently in Phase.
R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28685 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 21:40:59 +00:00
floitsch@google.com dc9c5f42ed Redo StreamTransformers so they work with Stack traces.
Since this involved a breaking change I cleaned up more of the
StreamTransformer API.

This CL also deprecates the getAttachedStackTrace method.

R=ajohnsen@google.com, lrn@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28562 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 12:34:34 +00:00
nweiz@google.com 96e9dce1d4 Make PhaseOutput emit a new AssetNode whenever it changes outputs.
Previously, PhaseOutput produced a single AssetNode whose value it
would update whenever the forwarded output changed. This worked well
for a while, but once Phase started caring about the AssetNode's
origin, it became problematic. PhaseOutput would change the origin,
but Phase would have no way of knowing this, and the AssetNode would
end up sorted into the wrong place (treated as a forwarded node when
it shouldn't be, or vice versa).

This CL fixes that issue by removing the possibility of modifying an
AssetNode's origin. PhaseOutput now just creates a new AssetNode
instead. This has the additional benefit of cleaning up some
duplicated code in Phase.

R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28386 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 22:20:28 +00:00
nweiz@google.com 0e195d3994 Add support for transformer clusters to barback.
A cluster encapsulates a transformation graph in a form that can be used
similarly to a plain transformer.

R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28344 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 00:30:50 +00:00
whesse@google.com 428e84e7d4 Use Directory.systemTemp getter in pkg subdirectory of repository.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28218 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 13:12:10 +00:00
nweiz@google.com 60605c310b Fix a barback bug where a result could be emitted incorrectly.
PackageGraph was relying on its own knowledge of which AssetCascades
were dirty, based on which cascades had assets updated. However, it's
possible for a cascade to become dirty due to another cascade's asset
being updated, and that case was missed. This change addresses that.

R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27904 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 19:17:25 +00:00
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