Dart SDK M4 is ready for download

415 views
Skip to first unread message

Lars Bak

unread,
Apr 16, 2013, 12:50:22 PM4/16/13
to mi...@dartlang.org
Hi Darters

Please check out our new Dart blog post about today's release of Dart SDK M4.
The core libraries are now stable (no more breaking changes) and runtime performance is up.
The next phase of the Dart project is maturing the platform by focusing on bug fixing and, of course, making it even faster.

Enjoy the release,
  Lars Bak

Dan Grove

unread,
Apr 16, 2013, 12:52:41 PM4/16/13
to General Dart Discussion
A number of breaking changes came in just before this release - here they are:

Many changes in dart:async, dart:core:

  • The separator argument in Iterable.join defaults to “” (instead of `null`).

  • All DateTime constants are non-abbreviated. Also changed DAYS_IN_WEEK to DAYS_PER_WEEK.

  • Removed deprecated classes and methods

    • CollectionSink

    • Stream.pipeInto

    • Iterable/Stream . max/min

    • Collection (List, Set and Queue now extend Iterable directly)

    • Datetime.</<=/>/>=

    • IOSink.writeStream (renamed to IOSink.addStream)

    • IOSink.writeBytes (renamed to IOSink.add)

    • StreamSink (renamed to EventSink)

  • Iterable.reduce/Stream.reduce introduced that does not require an initial value.

  • List range functions were refactored:

    • List.getRange takes an endIndex argument and returns an Iterable.

    • List.setRange takes an endIndex and an iterable (plus an optional skipCount).

    • List.removeRange takes an endIndex.

    • List.insertRange got removed.

    • List.replaceRange was added.

    • List.fillRange was added.

    • List.setAll was added. (not strictly speaking a range function).

  • Stream.hasSubscribers -> Stream.hasListener

  • Removed async:EventSinkView.

  • Removed the AsyncError class.

  • Removed StreamController.broadcast.

  • dart:html has had most Web Worker related APIs removed while the correct API is worked out. The Worker class remains for spawning Javascript workers

  • Renamed InvocationMirror to Invocation

  • Function.apply uses Symbol for named arguments

  • dart:mirror now uses Symbol instead of String to represent names

--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 

James Wendel

unread,
Apr 16, 2013, 1:07:27 PM4/16/13
to mi...@dartlang.org
I downloaded the Linux SDK and it's not giving me the M4 version:

Version reported by dart --version:
Dart VM version: 0.4.5.1_r21094 (Mon Apr  8 14:38:13 2013)


Matthew Butler

unread,
Apr 16, 2013, 1:12:17 PM4/16/13
to mi...@dartlang.org
Yes, for some reason that version is the only one that does not have todays timestamp in http://gsdview.appspot.com/dart-editor-archive-integration/latest/
All others are updated except that? 

Rico Wind

unread,
Apr 16, 2013, 1:12:32 PM4/16/13
to General Dart Discussion, Devon Carew, Dan Grove
[+Dan, +Devon]
It seems that the gz file for linux64 (and this file only) was not updated.
Devon/Dan, any issues while promoting?

In the meantime you can take the zip file

Cheers,
Rico


Dzenan Ridjanovic

unread,
Apr 16, 2013, 1:14:25 PM4/16/13
to mi...@dartlang.org
With Dart Editor build 21548 I get the following error that I did not have before (I cannot relate the error with my code):

NoSuchMethodError: incorrect number of arguments passed to method named 'listen'
Receiver: Instance of '_RawSocket@0x1da10ec4'
Tried calling: listen(Closure: (dynamic, RawSocketEvent) => dynamic from Function '_onData@0x53e688e':., unsubscribeOnError: true, onError: Closure: (dynamic, dynamic) => dynamic, onDone: Closure: (dynamic) => dynamic)
Found: listen(onData, onError, onDone, cancelOnError)
Stack Trace:
#0      Object.noSuchMethod (dart:core-patch:1904:25)
#1      _RawSocket.listen (dart:io-patch:-1:-1)
#2      BufferedSocket.BufferedSocket._internal (package:sqljocky/src/buffered_socket.dart:22:19)
#3      BufferedSocket.connect.<anonymous closure> (package:sqljocky/src/buffered_socket.dart:37:18)
#4      _ThenFuture._sendValue (dart:async:397:24)
#5      _FutureImpl._setValue (dart:async:294:26)
#6      _FutureImpl._setOrChainValue (dart:async:371:16)
#7      _ThenFuture._sendValue (dart:async:403:21)
#8      _FutureImpl._setValue (dart:async:294:26)
#9      _CompleterImpl.complete (dart:async:129:21)
#10     _NativeSocket.connect.<anonymous closure>.<anonymous closure> (dart:io-patch:400:31)
#11     _NativeSocket.multiplex (dart:io-patch:512:18)
#12     _NativeSocket.connectToEventHandler.<anonymous closure> (dart:io-patch:597:54)
#13     _ReceivePortImpl._handleMessage (dart:isolate-patch:81:92)


Unhandled exception:
Class '_RawSocket' has no instance method 'listen' with matching arguments.

NoSuchMethodError: incorrect number of arguments passed to method named 'listen'
Receiver: Instance of '_RawSocket@0x1da10ec4'
Tried calling: listen(Closure: (dynamic, RawSocketEvent) => dynamic from Function '_onData@0x53e688e':., unsubscribeOnError: true, onError: Closure: (dynamic, dynamic) => dynamic, onDone: Closure: (dynamic) => dynamic)
Found: listen(onData, onError, onDone, cancelOnError)
#0      _FutureImpl._scheduleUnhandledError.<anonymous closure> (dart:async:325:9)
#1      Timer.run.<anonymous closure> (dart:async:2240:21)
#2      Timer.run.<anonymous closure> (dart:async:2248:13)
#3      Timer.Timer.<anonymous closure> (dart:async-patch:15:15)
#4      _Timer._createTimerHandler._handleTimeout (dart:io:6721:28)
#5      _Timer._createTimerHandler._handleTimeout (dart:io:6729:7)
#6      _Timer._createTimerHandler.<anonymous closure> (dart:io:6737:23)
#7      _ReceivePortImpl._handleMessage (dart:isolate-patch:81:92)

Dan Grove

unread,
Apr 16, 2013, 1:15:23 PM4/16/13
to Rico Wind, General Dart Discussion, Devon Carew

I saw no issues when I promoted the build. We will get it fixed soon.

Matthew Butler

unread,
Apr 16, 2013, 1:17:02 PM4/16/13
to mi...@dartlang.org
This appears to be related to sqljocky. You will need to wait for that package owner to update their library and publish the update onto pub (the run pub-update on your end)

Matt

Justin Fagnani

unread,
Apr 16, 2013, 1:18:17 PM4/16/13
to General Dart Discussion
On Tue, Apr 16, 2013 at 10:14 AM, Dzenan Ridjanovic <dze...@gmail.com> wrote:
With Dart Editor build 21548 I get the following error that I did not have before (I cannot relate the error with my code):

NoSuchMethodError: incorrect number of arguments passed to method named 'listen'
Receiver: Instance of '_RawSocket@0x1da10ec4'
Tried calling: listen(Closure: (dynamic, RawSocketEvent) => dynamic from Function '_onData@0x53e688e':., unsubscribeOnError: true, onError: Closure: (dynamic, dynamic) => dynamic, onDone: Closure: (dynamic) => dynamic)
Found: listen(onData, onError, onDone, cancelOnError)

Dzenan Ridjanovic

unread,
Apr 16, 2013, 1:21:00 PM4/16/13
to mi...@dartlang.org
Thanks Matt.

Dzenan Ridjanovic

unread,
Apr 16, 2013, 1:24:24 PM4/16/13
to mi...@dartlang.org
Thanks Justin.

Rico Wind

unread,
Apr 16, 2013, 1:31:11 PM4/16/13
to General Dart Discussion
The 64 bit Linux gz file is now updated

Sorry about the inconvenience

Cheers,
Rico

Sean Eagan

unread,
Apr 16, 2013, 1:45:56 PM4/16/13
to General Dart Discussion

The blog post says "core and collection libraries" are stable.  Assuming this consists of:

dart:core
dart:async
dart:collection

Is that correct?

Cheers,
Sean Eagan


--

Seth Ladd

unread,
Apr 16, 2013, 1:47:17 PM4/16/13
to General Dart Discussion
On Tue, Apr 16, 2013 at 10:45 AM, Sean Eagan <seane...@gmail.com> wrote:

The blog post says "core and collection libraries" are stable.  Assuming this consists of:

dart:core
dart:async
dart:collection

Is that correct?

I was just going to ask that :)

Mads Ager

unread,
Apr 16, 2013, 1:52:40 PM4/16/13
to General Dart Discussion
On Tue, Apr 16, 2013 at 7:45 PM, Sean Eagan <seane...@gmail.com> wrote:

The blog post says "core and collection libraries" are stable.  Assuming this consists of:

dart:core
dart:async
dart:collection

Is that correct?

That is correct. :-)

Cheers,    -- Mads 

John Messerly

unread,
Apr 16, 2013, 2:12:37 PM4/16/13
to General Dart Discussion
Yeah. dart:html is getting there, but it's not stable yet.

For the curious, the challenge is: we generate Dart bindings from the Blink IDL files, and we're tracking HEAD. They've got a lot of APIs that have support of multiple browser vendors, but the specs aren't finalized, so they change out underneath us constantly. Also new ones are being added all the time by Blink/Chrome engineers, and they show up before we've had a chance to Dartify them or try to get polyfills.

As I understand it: we're working on a scheme where we can annotate dart:html with different degrees of stability and browser support (not unlike what node.js does, if you're familiar with that system). Based on your Editor/Analyzer settings, you'll be able to opt-in to the experimental or non-cross browser APIs. But they'll give a warning or be hidden (exact details TBD) by default.

TL;DR: we have APIs of different stability levels in dart:html, and we want to communicate that clearly when you're using them.

George Moschovitis

unread,
Apr 16, 2013, 2:21:13 PM4/16/13
to mi...@dartlang.org

Please check out our new Dart blog post about today's release of Dart SDK M4.

Congrats!
-g.

macdevign

unread,
Apr 16, 2013, 4:47:41 PM4/16/13
to mi...@dartlang.org
awesome progress.  Let see if  the final release is just in time for google IO, which may help boost publicity.

Sean Eagan

unread,
Apr 16, 2013, 11:20:10 PM4/16/13
to General Dart Discussion
Does this mean that the classes in these libraries will never get any new instance methods, since that would break implementors of the classes?  Please say no. :-)

Similarly, will these libraries never get any new top-level declarations (classes, methods, variables, typedefs, enums) since that could cause name collisions when using them?

Cheers,
Sean Eagan

Ladislav Thon

unread,
Apr 17, 2013, 12:43:40 AM4/17/13
to General Dart Discussion


> Hi Darters

Hi Lars,

awesome to hear from you again. If I count correctly, this is your third email to this list :-) I just wanted to point out that the usual designation of this community is "Dartisans" :-)

No, seriously, great work. Even though I sometimes feel that you are rushing things too much (like... I'd really love the dart: async library to get a facelift, and removing Collection is just... I'd rather rename Iterable to Collection).

Thanks, anyway!

LT

Florian Loitsch

unread,
Apr 17, 2013, 5:08:48 AM4/17/13
to General Dart Discussion
On Wed, Apr 17, 2013 at 5:20 AM, Sean Eagan <seane...@gmail.com> wrote:
Does this mean that the classes in these libraries will never get any new instance methods, since that would break implementors of the classes?  Please say no. :-)
We will try not to, but we already discovered that Stream.forEach was missing. So "no".
Not implementing a method is only a static warning, and if we add a method we will not use it from inside our library. This means that already running code will continue running. In almost all cases it is hence a non-breaking change. It could only lead to problems if you already declared a similar method with different signature or different semantics.

However, the focus is to keep these libraries as stable as possible.


Similarly, will these libraries never get any new top-level declarations (classes, methods, variables, typedefs, enums) since that could cause name collisions when using them?
I'm pretty sure we won't add any new classes to dart:core. dart:collection and dart:async might see new top-level declarations.
Again: we will try to avoid adding new declarations since they could break users.

// florian



--
Give a man a fire and he's warm for the whole day,
but set fire to him and he's warm for the rest of his life. - Terry Pratchett

Ladislav Thon

unread,
Apr 17, 2013, 5:22:32 AM4/17/13
to mi...@dartlang.org
Does this mean that the classes in these libraries will never get any new instance methods, since that would break implementors of the classes?  Please say no. :-)
We will try not to, but we already discovered that Stream.forEach was missing.

What's a Stream.forEach anyway? I'm looking at the commit now, and it looks like a variant of listen, which additionally returns a Future which completes when the stream is exhausted. So... doesn't this effectively deprecate listen? :-)

LT

Paweł Szczur

unread,
Apr 17, 2013, 7:04:46 AM4/17/13
to mi...@dartlang.org
As for myself, breaking changes:
1. http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#ch02-keywords enum became a keyword (dart breaks on var enum = 1;)
2. Iterable -> IterableBase

Ladislav Thon

unread,
Apr 17, 2013, 7:07:02 AM4/17/13
to mi...@dartlang.org
1. http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#ch02-keywords enum became a keyword (dart breaks on var enum = 1;)

Where's the updated specification, anyway? :-)

LT

Pawel Szczur

unread,
Apr 17, 2013, 7:11:02 AM4/17/13
to mi...@dartlang.org
I have no clue, I've just observed that a code where I've used 'enum' broke. The error msg wasn't very useful, i've made a scientific guess :)


2013/4/17 Ladislav Thon <lad...@gmail.com>
1. http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#ch02-keywords enum became a keyword (dart breaks on var enum = 1;)

Where's the updated specification, anyway? :-)

LT

--

Lasse R.H. Nielsen

unread,
Apr 17, 2013, 8:54:46 AM4/17/13
to mi...@dartlang.org
No. Listen is the base operation that all the other Stream operations are defined in terms of, including forEach.The forEach method on Stream is just a convenience method that may make make some code shorter, just as forEach on Iterable is just equivalent to 
  for(var x in this) action(x);

/L


--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 



--
Lasse R.H. Nielsen - l...@google.com  
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K - Denmark - CVR nr. 28 86 69 84

ybbsadd

unread,
Apr 19, 2013, 7:41:38 PM4/19/13
to mi...@dartlang.org


Am Dienstag, 16. April 2013 18:50:22 UTC+2 schrieb Lars Bak:
Hi Darters

Please check out our new Dart blog post about today's release of Dart SDK M4.
The core libraries are now stable (no more breaking changes) and runtime performance is up.
The next phase of the Dart project is maturing the platform by focusing on bug fixing and, of course, making it even faster.

Enjoy the release,
  Lars Bak


I'm missing the digit "4" on this pages: http://www.dartlang.org/docs/spec/


Reply all
Reply to author
Forward
0 new messages