Commit Graph

120 Commits

Author SHA1 Message Date
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
nweiz@google.com 2cef9e2c7b Make pkg/stack_trace use stack chains.
scheduled_test now uses stack chains for all of its error reporting. This also
adds a number of [Chain.track] calls to work around issue 15105.

R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30836 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 00:18:50 +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
rnystrom@google.com 9e26a0fc10 Fix some static warnings.
BUG=
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30682 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 22:59:07 +00:00
nweiz@google.com bcdb64e20e Refactor pkg/path.
This CL does several things:

* Splits lib/path.dart into multiple libraries.

* Renames "Builder" to "Context".

* Makes the Context API match the top-level functions ("root" was
  renamed to "current" and "resolve" was renamed to "absolute").

* The top-level "absolute" function now takes multiple parts, to match
  [Context.absolute].

R=rnystrom@google.com
BUG=14981

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30423 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 20:48:45 +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 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
ajohnsen@google.com eb784f6d98 Fix scheduled_server_test to not timeout-fail.
The test was expecting the server to be force closed on errors.

BUG=
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29984 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 17:42:21 +00:00
nweiz@google.com 2b7caadbc6 Fix a broken scheduled_test test.
R=rnystrom@google.com
BUG=14639

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29773 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 22:10:32 +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
lrn@google.com f0a1c922a2 Reapply "Remove @deprecated features."
R=scheglov@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
amouravski@google.com 60b57c3a38 Update headings to use sentence case.
R=kathyw@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29462 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:23:32 +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
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
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
ajohnsen@google.com b1f7f7aeef Fix comment.
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28054 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 15:01:04 +00:00
ajohnsen@google.com 56d68efbb3 Use SIGKILL in scheduled_process, to get around an Mac OS X bug.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27986 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 06:47:13 +00:00
whesse@google.com d13f982643 Change pub tests and pub local server to use ipV4 localhost by address.
BUG=dartbug.com/12837
R=ajohnsen@google.com, nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27880 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 14:36:32 +00:00
whesse@google.com e7b1c5f7d4 Fix failures in pkg/scheduled_test scheduled_server_test.
The package and test were throwing strings, which do not have attached stack traces because they are primitives.

BUG=dartbug.com/9582
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27790 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 00:00:37 +00:00
whesse@google.com 330c1ef3bb Change package scheduled_test to throw TestFailures rather than strings.
BUG=
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27787 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 23:31:02 +00:00
nweiz@google.com a9861a6cf5 Stop working around issue 9535.
R=rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27169 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 00:02: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
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
sgjesse@google.com 38506f9d57 Remove the LineTransformer from dart:io
The LineTransformer has been retired, and is replaced with LineSplitter from dart:convert

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26419 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 07:35:46 +00:00
kevmoo@j832.com 18d38085ab pkg: analysis aided cleanup
Removed a lot of warnings and hints when opening many pkg projects in the editor

R=gram@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25831 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 20:42:04 +00:00
gram@google.com fb62473ebf Add missing newline after Actual value in fail message.
Remove the BasMatcher class; it made some sense when we had both 'interface'
and 'class' but adds no value now.
Fix a comment in the CustomMatcher documentation.
Fix tests affected by these changes.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25356 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 19:48:26 +00:00
ajohnsen@google.com 2bd55c23c7 Keep track of when a socket has been destroyed
This adds the event CLOSED to RawSocket and RawServerSocket. This
event indicate that the underlying socket is now destroyed.

This is used to make Socket.close and ServerSocket.close return a
future which is completed when the unserlying socket is
destroyed. This can be used to start listening on the same port after
closing a server socket.

R=ajohnsen@google.com, kustermann@google.com

BUG=https://code.google.com/p/dart/issues/detail?id=4155

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25213 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 13:26:48 +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
lrn@google.com 1315656027 Make asBroadcastStream take two callbacks.
These callbacks will be called when the broadcast stream no longer
has any listeners, or when it gets a listener after having none.

The callback is provided with a StreamSubscription-like object where
it can pause/resume/cancel the underlying subscription on the original
stream.

BUG=http://dartbug.com/11289
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24776 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-04 13:02:02 +00:00
gram@google.com 50c5137e55 Change MatchState to Map.
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24046 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 19:46:16 +00:00
ajohnsen@google.com 5ce3b9ddea Clean up dart:io exceptions.
- Introduce IOException.
- Remove HttpParserException.
- Merge RedirectLimitExceededException and RedirectLoopException into
RedirectException.
- Remove 'IO' from FileIOException, DirectoryIOException, LinkIOException
and SocketIOException.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23848 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:15:46 +00:00
nweiz@google.com ebaa28cfec Make my pkg packages warning-clean.
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23620 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 23:34:06 +00:00
nweiz@google.com 29342cea22 Mark the "completes" matcher as final.
R=gram@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23618 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 22:31:55 +00:00
nweiz@google.com b53e4a8fde Fix an analyzer error in scheduled_test.
TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23612 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 20:08:54 +00:00
nweiz@google.com 9e49b867e7 Allow DirectoryDescriptor.load to load a file next to a directory.
This mkaes it easier to model servers using descriptors.

R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23607 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 18:30:48 +00:00
lrn@google.com faa7227cec Make new StreamController be async by default.
Change all instances, except some tests, to be sync still.
Rename Multiplex to Broadcast everywhere.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23453 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 06:07:39 +00:00
sgjesse@google.com 69df933ff3 Remove the HttpRequest.queryParameters getter
The parsed query parameters are now now available from the Uri object.

TBR=whesse@google.com

BUG=http://dartbug/2641

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23413 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 13:39:24 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
lrn@google.com 37b1cd3b3f Optimize internals of multiplex-streams.
Make the multiplex streams broadcast streams.
This allows you to listen twice on the same stream, instead of having to get
a new stream each time.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23256 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 12:06:34 +00:00
lrn@google.com 781e84284f Reapply "Active stream subscriptions".
Makes subscriptions the active part of a stream, with the stream
itself being just an inert creator of subscriptions.

This changes the behavior of a "single subscription" stream to match
the documentation: After the subscription is canceled, you can't
resubscribe to the stream. Previously, you could do that, but it was
never documented or intended.
This also makes the stream of a StreamController not be paused while
before it's subscribed - it is always the subscription that is paused
or not, and while there is no subscription, the stream cannot be
paused. Previously the stream was set to paused until the first
subscription in order to prevent events from being lost. That is
handled independently of pauses now.

Adds StreamController.multiplex constructor. This name is tentative,
and likely to change. Its behavior may change as well. It currently
provides a new single-subscription stream each time its "stream"
getter is read, and you can subscribe to these.

Adds StreamIterator class that allows iterating over a stream's data
events using (async) "moveNext()" and "current", like a direct style
Iterator (sorry, it won't work in a for-in loop).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23237 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 07:28:36 +00:00
lrn@google.com cc0d9d57af Revert until Windows crash is debugged.
Reverts r23218, r23217, r23208, r23207, r23206, r23205, r23204.

r23218 | Path observer is listened more than once, so make it multiplex.
r23217 | Add StreamController.multiplex constructor.
r23208 | Fix bug in streamimpl
r23207 | Fix bug in stream iterator.
r23206 | Change expectations for http_parser_test.
r23205 | Fix bug in stream-impl.
r23204 | Make StreamSubscription be the active part of a string.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23221 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-27 13:03:03 +00:00
lrn@google.com 23162a3847 Add StreamController.multiplex constructor.
The "multiplex" stream controller will generate a new stream every
time .stream is read on the controller, and it will send events to
any stream that currently has a listener.
The streams handle their own buffering. Events added before the listen
are ignored.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23217 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-27 12:27:20 +00:00
lrn@google.com ee1c11a2a6 Make StreamSubscription be the active part of a string.
It is the one keeping the buffer of events, not the stream.

R=ajohnsen@google.com, floitsch@google.com, jmesserly@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23204 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-27 08:34:20 +00:00
nweiz@google.com 273590c8c5 Stop working around issue 9020 in scheduled_test.
R=rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23187 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 22:36:40 +00:00
ajohnsen@google.com 87ea640826 Remove ProcessOptions and make the options named arguments.
This also removed Process.runShell and adds a new flag: runInShell.

BUG=
R=kustermann@google.com, nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23131 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 11:03:40 +00:00