[dart-announce] Dart 1.12 "RC0" ready for testing

127 views
Skip to first unread message

'Seth Ladd' via Dart Announcements

unread,
Aug 25, 2015, 11:03:42 AM8/25/15
to anno...@dartlang.org

tldr: Dart 1.12.0-dev.5.10 ("RC0") is ready for testing! Please download it and test it against your apps. This is the first release candidate of 1.12. It contains the new null-aware operators language feature, and enhancements to pub, Observatory, dartdoc, and much more.


Null-aware operators


The new null-aware operators help you reduce the amount of code required to work with references that are potentially null. This feature is a collection of syntactic sugar for traversing (potentially null) object calls, conditionally setting a variable, and evaluating two (potentially null) expressions.


`??`: if null operator. `expr1 ?? expr2` evaluates to `expr1` if not `null`, otherwise `expr2`.

`??=`: null-aware assignment. `v ??= expr` causes `v` to be assigned `expr` only if `v` is `null`.

`x?.p`: null-aware access. `x?.p` evaluates to `x.p` if `x` is not `null`, otherwise evaluates to `null`.

`x?.m()`: null-aware method invocation. `x?.m()` invokes `m` only if `x` is not `null`.


Learn more about Dart's null-aware operators in our Language Tour.


.packages file


We continue in our efforts to eliminate symlinks by introducing the .packages file, which is a new way to specify where to find package dependencies. The pub package manager now writes a .packages file when getting or upgrading dependencies, and the VM and dartanalyzer use the .packages file for package resolution.


The Dart SDK still generates symlinks in 1.12, but the .packages file gets us closer to eliminating them. If you have tools that introspect packages, now is a good time to investigate the .packages file.


dartdoc


The dartdoc tool is a new way to generate beautiful, fast-loading API docs. It replaces dartdocgen, which we plan to remove from the SDK as soon as 1.13. dartdoc generates static docs, helps you search with find-as-you-type, and looks great on a mobile device.


dartfmt


Speed up your code reviews by automatically formatting your code. The dartfmt tool has been largely rewritten to support better handling for long argument lists, smarter indentation for cascades, nested functions, and collections, and fixes over 50 issues.


Observatory


Help identify memory leaks with Observatory's updated allocation profiler. Turn it on for a class, and track where instances of that class are created. Also new in 1.12 is support for dart:developer's log() function, which your app can use to stream log calls into Observatory's (or any connected debugger) console.


Stepping through async/await code has been significantly improved with Observatory's new anext command. You can now step over an await call, onto the next line of your code.


pub


The pub run commands can now toggle checked mode, with --checked. Pub now writes a .packages file when getting, upgrading, and globally activating your packages.


Lots more


The Dart SDK 1.12 CHANGELOG has lots more details about various API tweaks. We look forward to your feedback, so we can release 1.12 final. Please test your packages and apps with 1.12 "RC0" and report issues.


--
For more news and information, visit https://plus.google.com/+dartlang
 
To join the conversation, visit https://groups.google.com/a/dartlang.org/

Seth Ladd

unread,
Aug 25, 2015, 11:46:19 AM8/25/15
to General Dart Discussion

Ron Gonzalez Lobo

unread,
Aug 25, 2015, 12:02:21 PM8/25/15
to mi...@dartlang.org, anno...@dartlang.org
That's great!

My WebStorm just told me ;)

Daniel Davidson

unread,
Aug 29, 2015, 3:58:13 PM8/29/15
to Dart Misc, anno...@dartlang.org
What is the right way to work some of this into code in terms of pub?
So with packages when you want to support a new version you can bump a version spec. What is the comparable approach for the language itself?

Matthew Butler

unread,
Aug 29, 2015, 9:46:00 PM8/29/15
to Dart Misc, anno...@dartlang.org
Using SDK Constraints in your package[1]:

environment:
  sdk: '>=1.12.0 <2.0.0'

Don Olmstead

unread,
Aug 30, 2015, 2:25:15 PM8/30/15
to mi...@dartlang.org
It'd also be nice if Sean could get den to provide a way to update sdk constraints automagically, https://github.com/seaneagan/den.

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Reply all
Reply to author
Forward
0 new messages