Commit Graph

87 Commits

Author SHA1 Message Date
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
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
floitsch@google.com 7006de6f23 Remove deprecated parts of dart:async.
Attempt to fix most uses of the deprecated features.

R=floitsch@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29628 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:24:29 +00:00
rnystrom@google.com c638273b84 Revise barback logging patch.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29483 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 20:01:12 +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
sigmund@google.com 7c2e6295aa Fix type errors detected with --error-on-bad-type.
R=nweiz@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29047 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 23:41:05 +00:00
nweiz@google.com 0fb1f14635 Cap the number of FDs used by barback at 32.
BUG=13752
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29034 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 20:29:46 +00:00
nweiz@google.com 7ff3b89aba Make sure barback's FilePool doesn't take up *all* the available FDs.
BUG=13752
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29021 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 18:36:57 +00:00
nweiz@google.com 2f53ba7b48 Make barback propagate logs synchronously.
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28893 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 22:58:08 +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 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +00:00
rnystrom@google.com 2c095c78d9 Make pub build use barback.
BUG=https://code.google.com/p/dart/issues/detail?id=13880
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28524 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 16:17:06 +00:00
floitsch@google.com 4be547c705 Adapt streams for additional stackTrace argument.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28511 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 12:02:20 +00:00
floitsch@google.com 956243966a Add second argument to Future error handlers.
R=lrn@google.com, nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28510 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 11:42:39 +00:00
rnystrom@google.com 8abeb673a2 Improve barback/pub logging.
Barback now lets you provide a logger, and pub gives it one that
pipes through pub's logging infrastructure. I'll need this to
get pub build using barback and easily testable with well-defined
console output.

BUG=https://code.google.com/p/dart/issues/detail?id=13880
R=alanknight@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28486 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 23:16:59 +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 587b11d93b Fix an analyzer error in barback.
TBR

R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28346 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 00:41:27 +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
rnystrom@google.com 7955fe09ae Use our own DiagnosticHandler for dart2js.
Instead of implementing SourceFileProvider and using dart2js's
built in DiagnosticHandler, we just provide our own
CompilerInputProvider and DiagnosticHandler functions. This avoids
implementing stuff in SourceFileProvider and, more importantly,
lets us handle missing source files better.

The DiagnosticHandler in dart2js just barfs and trashes the original
error if it can't find a source file to associate with it. The windows
bots are currently failing on an error I can't see because it doesn't
have a source file.

BUG=
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28246 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 21:49:12 +00:00
rnystrom@google.com 385516edf3 Support dart2js in pub serve.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28231 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 17:37:11 +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 7385f9c3a8 Support transformers that depend on other transformers.
R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27322 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 00:48:12 +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
rnystrom@google.com c685af6b0f Fix a few warnings.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26820 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:27:58 +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