nweiz@google.com
7c5db3616b
Only run [Transformer.isPrimary] once for each asset/transformer pair.
...
BUG=16442
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//224933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34857 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 23:59:24 +00:00
nweiz@google.com
da4d59c05e
Only pass an AssetId to isPrimary and declareOutputs.
...
BUG=16442
R=blois@google.com , efortuna@google.com , rnystrom@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//223553008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34853 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 23:46:23 +00:00
nweiz@google.com
9c1ea39a19
Get rid of an unused library in barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//210223005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34346 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 01:08:31 +00:00
nweiz@google.com
88fab79855
Re-run a transform when a secondary input starts existing.
...
R=rnystrom@google.com
BUG=17480
Review URL: https://codereview.chromium.org//200983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33729 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-15 02:40:06 +00:00
nweiz@google.com
c5fee85518
Make barback's onAsset streams broadcast rather than single-subscriber.
...
This brings these streams in line with the other Barback streams, allows us to
remove [Phase._next], and paves the way for re-running transformers when a
secondary input is added.
R=rnystrom@google.com
BUG=17480
Review URL: https://codereview.chromium.org//200473006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33727 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 23:15:27 +00:00
nweiz@google.com
d960604eb3
Add a [Transform.hasInput] convenience method to Barback.
...
R=rnystrom@google.com
BUG=13264
Review URL: https://codereview.chromium.org//196983015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33724 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 21:54:30 +00:00
nweiz@google.com
c4b6289cda
Improve the documentation for [TransformLogger.error].
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//199723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33716 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 20:24:15 +00:00
nweiz@google.com
645b713bfe
Consider errors logged by a transformer equivalent to thrown errors.
...
R=rnystrom@google.com
BUG=15618
Review URL: https://codereview.chromium.org//196473016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33674 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 23:31:03 +00:00
nweiz@google.com
10dcf9764a
Asset load failures in Barback should produce AssetNotFoundExceptions.
...
Previously they were producing MissingInputExceptions, which is the
class used to communicate to listener's on Barback's error stream that
a transformer failed due to a missing input. The Transformer
documentation said that it should get AssetNotFoundExceptions and
those are easier to serialize anyway.
R=rnystrom@google.com
BUG=17225
Review URL: https://codereview.chromium.org//199443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33673 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 23:26:16 +00:00
nweiz@google.com
f993056557
Don't pass an asset through a transformer that produces an error.
...
R=rnystrom@google.com
BUG=17415
Review URL: https://codereview.chromium.org//195993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33661 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 20:14:17 +00:00
nweiz@google.com
736f724808
Pre-compute the stack chain in Barback's _WrappedException.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//196223005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33660 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 19:24:27 +00:00
nweiz@google.com
429d0aef98
Fix analyzer errors in barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//195983011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33632 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 00:43:39 +00:00
nweiz@google.com
f66fcea5f8
Support extensions with multiple periods in Transformer.allowedExtensions.
...
R=rnystrom@google.com
BUG=17167
Review URL: https://codereview.chromium.org//198103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33629 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 23:31:46 +00:00
nweiz@google.com
598c5c8ee1
Move isPrimary computation from PhaseInput into TransformNode.
...
In addition to cleaning up the code, this makes transforms more parallel and
paves the way for properly supporting declaring transformers.
R=rnystrom@google.com
BUG=17401
Review URL: https://codereview.chromium.org//196273003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33626 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 23:20:25 +00:00
nweiz@google.com
2c19a00856
Add BaseTransform.consumePrimary to barback.
...
R=rnystrom@google.com
BUG=16612
Review URL: https://codereview.chromium.org//191223004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33557 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 21:44:14 +00:00
nweiz@google.com
aa11f8396f
Refactor the Transform classes.
...
This adds a more principled way of exposing only the necessary API to the
Transformer while providing detailed information to the TransformNode. It lays
the groundwork for [consumePrimary].
R=rnystrom@google.com
BUG=16612
Review URL: https://codereview.chromium.org//178223024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33449 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 20:32:50 +00:00
nweiz@google.com
8f9faf01b0
Avoid O(n^2) behavior in Barback.
...
This changes [Phase.isDirty] and [Phase.onDone] to consider a phase
dirty if any previous phase is also dirty. Not only is this more
efficient, it's more accurate, since now [Phase.isDirty] is true
exactly when it's possible that a phase will emit new outputs.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//189623006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33447 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 20:10:19 +00:00
nweiz@google.com
37224e2c2e
Fix a bug in barback caused by r33408.
...
It turns out barback didn't have any tests for removing a transformer group
(oops!), and r33408 introduced a bug there. This fixes that bug and adds a test.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//189583005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33410 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 01:55:51 +00:00
nweiz@google.com
245ed2801d
Make Phase.getInput in barback play nicely with the push model.
...
The previous implementation made assumptions about each phase being
finished before the next one started. These assumptions were
invalidated by r33391.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//189263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33408 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 01:41:37 +00:00
nweiz@google.com
9260e1620b
Roll forward commits r33138, r33135, and r33134.
...
These commits were rolled back because r33134 exposed a case where barback was
able to deadlock. r33391 removed the root cause of the deadlock, so these
commits can be rolled forward again.
R=rnystrom@google.com
BUG=16612
Review URL: https://codereview.chromium.org//188673004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33400 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:28:10 +00:00
nweiz@google.com
8a8e27205e
Move Barback to a more thoroughly push-based model.
...
This had a couple smaller ramifications:
* Instead of onDirty streams, most nodes now emit onDone streams that indicate
when they have no more processing to do.
* AssetCascade was made more similar to other nodes; the BuildResult aggregation
is now done entirely in PackageGraph.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//187263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33391 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 19:31:56 +00:00
nweiz@google.com
3ef00de5cd
Use zones to capture unexpected errors in barback.
...
Rather than being extremely diligent about capturing and piping
asynchronous errors within barback, we can now rely on the zone API to
put all of them where they belong.
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//183813006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33315 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 00:12:10 +00:00
nweiz@google.com
1e6b7a27bd
Revert commits r33138, r33135, and r33134.
...
r33134 introduced bugs that require a reasonably substantial refactor, and the
other two built on top of it.
R=rnystrom@google.com
TBR
Review URL: https://codereview.chromium.org//183993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33144 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 01:14:24 +00:00
nweiz@google.com
d11e95b5be
Barback transforms now pass through the primary input by default.
...
R=rnystrom@google.com
BUG=16612
Review URL: https://codereview.chromium.org//180473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33134 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 21:49:19 +00:00
nweiz@google.com
29be7bfba2
Add support for a "fine" barback log level.
...
This level is not printed by default, but will be printed by pub if
--verbose is set.
Also update the observe/polymer version constraints. This change is
backwards-compatible from a transformer implementer's perspective, so the lower
bound doesn't need to be incremented.
BUG=16945
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//166333003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33000 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 01:24:26 +00:00
nweiz@google.com
6b112eb420
Add an issue reference to a TODO in barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//152083007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32536 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 01:46:50 +00:00
nweiz@google.com
01cadd4917
Add support for lazy transformers.
...
An upcoming CL will support propagating laziness through DryRunTransformers.
R=rnystrom@google.com
BUG=16077
Review URL: https://codereview.chromium.org//149243009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32516 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 20:17:54 +00:00
nweiz@google.com
5ae5b7d120
Fix a line of indentation in barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//133003007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32340 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 21:44:15 +00:00
nweiz@google.com
23c2fcd648
Add a bunch of toString methods to internal Barback classes.
...
These will make it easier to debug barback by making it easier to
inspect the current state.
R=alanknight@google.com
BUG=
Review URL: https://codereview.chromium.org//155213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32304 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 00:47:00 +00:00
nweiz@google.com
0cd85f6736
Wait for all log entries to be printed before exiting "pub build".
...
Previously, we could drop messages on the floor if too many were
emitted and the actual building was quick enough.
R=rnystrom@google.com
BUG=16242
Review URL: https://codereview.chromium.org//148213009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32141 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 21:28:08 +00:00
nweiz@google.com
99f31707a7
Update [getErrorMessage] to avoid throwing away useful information.
...
Many built-in exception types don't include some relevant information
in their exceptions' [message] property, so this CL goes back to using
[toString] to get string representations of exceptions. The unsightly
exception prefixes are now removed via regular expression.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//140973006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32045 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-28 00:14:16 +00:00
nweiz@google.com
d9e78ae090
Add a ScheduledStream class and some stream matchers.
...
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//119673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31629 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 22:14:30 +00:00
whesse@google.com
fb2aeee1c5
Add missing import of stack_trace to barback implementation.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//110533005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31124 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 11:41:38 +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
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
6955df5203
Add chain support to barback.
...
This also adds support to pub where necessary to maintain consistency with
barback.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//101523003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30880 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 23:58:56 +00:00
nweiz@google.com
2e14e7ae71
Use a pool to restrict access to file descriptors in pub.
...
This is like r30830, but it doesn't check out resources for process invocations
in an attempt to narrow down the cause of the Windows buildbot failure.
This also adds additional logging for the same purpose.
R=rnystrom@google.com
TBR
Review URL: https://codereview.chromium.org//100393010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30839 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 00:49:50 +00:00
nweiz@google.com
14d4e1f263
Revert "Use a pool to restrict access to file descriptors in pub."
...
This reverts r30830. This revert is just a test to see whether this CL caused
the windows bots to start failing or if it was a coincidence.
R=rnystrom@google.com
TBR
Review URL: https://codereview.chromium.org//102693007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30837 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 00:33:41 +00:00
nweiz@google.com
b97f099b2e
Use a pool to restrict access to file descriptors in pub.
...
R=rnystrom@google.com
BUG=15358
Review URL: https://codereview.chromium.org//93013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30830 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 22:30:59 +00:00
lrn@google.com
8744794212
Change other futures to also have timeout take a named parameter.
...
Review URL: https://codereview.chromium.org//98683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30792 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-02 09:13:49 +00:00
lrn@google.com
e0314a6117
Add Future.timeout.
...
R=floitsch@google.com , nweiz@google.com
Review URL: https://codereview.chromium.org//91213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30745 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-28 08:16:01 +00:00
nweiz@google.com
20a6b4a97c
Fix an incorrect method invocation in barback.
...
BUG=15358
R=sigmund@google.com
Review URL: https://codereview.chromium.org//92883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30736 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 22:12:09 +00:00
nweiz@google.com
9552f94822
Ensure that errors have stack traces attached.
...
This adds a stack trace argument to all [completeError] and [addError]
calls in pub and associated libraries.
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//68493003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30332 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-16 01:19:39 +00:00
nweiz@google.com
557d1d5062
Fix an analyzer error in http and barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//62443006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30331 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-16 01:13:04 +00:00
nweiz@google.com
d018e7308e
Serialize binary barback assets using typed arrays.
...
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//68103027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30324 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-16 00:09:30 +00:00
nweiz@google.com
ea9d92f3f4
Fix a synchronous event bug in futureStream.
...
R=rnystrom@google.com
TBR
Review URL: https://codereview.chromium.org//68713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30182 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 01:56:18 +00:00
nweiz@google.com
0a4fb91145
Properly close watcher streams during tests.
...
This also makes [futureStream] pass cancellations through to the underlying
stream, and adds the ability for it to return broadcast streams.
R=rnystrom@google.com
BUG=14943
Review URL: https://codereview.chromium.org//66293008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30180 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 01:42:00 +00:00
nweiz@google.com
0a22d14296
Work around issue 14971 in barback.
...
R=rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//63243003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30131 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 23:34:53 +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