BUG= R=alanknight@google.com, whesse@google.com Review URL: https://codereview.chromium.org//1361163002 .
20 KiB
1.13.0
-
dart:core
Uri
addedremoveFragment
method.String.allMatches
(implementingPattern.allMatches
) is now lazy, as allallMatches
implementations are intended to be.
-
dart:io
HttpClient
no longer sends URI fragments in the request. This is not allowed by the HTTP protocol. TheHttpServer
still gracefully receives fragments, but discards them before delivering the request.
-
dart:async
StreamTransformer
s created withfromHandlers
with nohandleError
callback now forward stack traces along with errors to the resulting streams.
Tool changes
docgen
and 'dartdocgen' no longer ship in the sdk. Thedocgen
sources have been removed from the repository.
1.12.0
Language changes
- Null-aware operators
??
: if null operator.expr1 ?? expr2
evaluates toexpr1
if notnull
, otherwiseexpr2
.??=
: null-aware assignment.v ??= expr
causesv
to be assignedexpr
only ifv
isnull
.x?.p
: null-aware access.x?.p
evaluates tox.p
ifx
is notnull
, otherwise evaluates tonull
.x?.m()
: null-aware method invocation.x?.m()
invokesm
only ifx
is notnull
.
Core library changes
-
dart:async
StreamController
added setters for theonListen
,onPause
,onResume
andonCancel
callbacks.
-
dart:convert
LineSplitter
added asplit
static method returning anIterable
.
-
dart:core
Uri
class now perform path normalization when a URI is created. This removes most..
and.
sequences from the URI path. Purely relative paths (no scheme or authority) are allowed to retain some leading "dot" segments. Also addedhasAbsolutePath
,hasEmptyPath
, andhasScheme
properties.
-
dart:developer
- New
log
function to transmit logging events to Observatory.
- New
-
dart:html
NodeTreeSanitizer
added theconst trusted
field. It can be used instead of defining aNullTreeSanitizer
class when callingsetInnerHtml
or other methods that create DOM from text. It is also more efficient, skipping the creation of aDocumentFragment
.
-
dart:io
-
dart:isolate
- Added
onError
,onExit
anderrorsAreFatal
parameters toIsolate.spawnUri
.
- Added
-
dart:mirrors
InstanceMirror.delegate
moved up toObjectMirror
.- Fix InstanceMirror.getField optimization when the selector is an operator.
- Fix reflective NoSuchMethodErrors to match their non-reflective counterparts when due to argument mismatches. (VM only)
Tool changes
-
Documentation tools
-
dartdoc
is now the default tool to generate static HTML for API docs. Learn more. -
docgen
anddartdocgen
have been deprecated. Currently plan is to remove them in 1.13.
-
-
Formatter (
dartfmt
)-
Over 50 bugs fixed.
-
Optimized line splitter is much faster and produces better output on complex code.
-
-
Observatory
-
Allocation profiling.
-
New feature to display output from logging.
-
Heap snapshot analysis works for 64-bit VMs.
-
Improved ability to inspect typed data, regex and compiled code.
-
Ability to break on all or uncaught exceptions from Observatory's debugger.
-
Ability to set closure-specific breakpoints.
-
'anext' - step past await/yield.
-
Preserve when a variable has been expanded/unexpanded in the debugger.
-
Keep focus on debugger input box whenever possible.
-
Echo stdout/stderr in the Observatory debugger. Standalone-only so far.
-
Minor fixes to service protocol documentation.
-
-
Pub
-
Breaking: various commands that previously ran
pub get
implicitly no longer do so. Instead, they merely check to make sure the ".packages" file is newer than the pubspec and the lock file, and fail if it's not. -
Added support for
--verbosity=error
and--verbosity=warning
. -
pub serve
now collapses multiple GET requests into a single line of output. For full output, use--verbose
. -
pub deps
has improved formatting for circular dependencies on the entrypoint package. -
pub run
andpub global run
-
Breaking: to match the behavior of the Dart VM, executables no longer run in checked mode by default. A
--checked
flag has been added to run them in checked mode manually. -
Faster start time for executables that don't import transformed code.
-
Binstubs for globally-activated executables are now written in the system encoding, rather than always in
UTF-8
. To update existing executables, runpub cache repair
.
-
-
pub get
andpub upgrade
-
Pub will now generate a ".packages" file in addition to the "packages" directory when running
pub get
or similar operations, per the package spec proposal. Pub now has a--no-package-symlinks
flag that will stop "packages" directories from being generated at all. -
An issue where HTTP requests were sometimes made even though
--offline
was passed has been fixed. -
A bug with
--offline
that caused an unhelpful error message has been fixed. -
Pub will no longer time out when a package takes a long time to download.
-
-
pub publish
-
Pub will emit a non-zero exit code when it finds a violation while publishing.
-
.gitignore
files will be respected even if the package isn't at the top level of the Git repository.
-
-
Barback integration
-
A crashing bug involving transformers that only apply to non-public code has been fixed.
-
A deadlock caused by declaring transformer followed by a lazy transformer (such as the built-in
$dart2js
transformer) has been fixed. -
A stack overflow caused by a transformer being run multiple times on the package that defines it has been fixed.
-
A transformer that tries to read a non-existent asset in another package will now be re-run if that asset is later created.
-
-
VM Service Protocol Changes
-
BREAKING The service protocol now sends JSON-RPC 2.0-compatible server-to-client events. To reflect this, the service protocol version is now 2.0.
-
The service protocol now includes a
"jsonrpc"
property in its responses, as opposed to"json-rpc"
. -
The service protocol now properly handles requests with non-string ids. Numeric ids are no longer converted to strings, and null ids now don't produce a response.
-
Some RPCs that didn't include a
"jsonrpc"
property in their responses now include one.
1.11.2
Core library changes
- Fix a bug where
WebSocket.close()
would crash if called afterWebSocket.cancel()
.
1.11.1
Tool changes
- Pub will always load Dart SDK assets from the SDK whose
pub
executable was run, even if aDART_SDK
environment variable is set.
1.11.0 - 2015-06-25
Core library changes
-
dart:core
Iterable
added anempty
constructor. dcf0286Iterable
can now be extended directly. An alternative to extendingIterableBase
fromdart:collection
.List
added anunmodifiable
constructor. r45334Map
added anunmodifiable
constructor. r45733int
added agcd
method. a192ef4int
added amodInverse
method. f6f338cStackTrace
added afromString
constructor. 68dd6f6Uri
added adirectory
constructor. d8dbb4a- List iterators may not throw
ConcurrentModificationError
as eagerly in release mode. In checked mode, the modification check is still as eager as possible. r45198
-
dart:developer
- NEW- Replaces the deprecated
dart:profiler
library. - Adds new functions
debugger
andinspect
. 6e42aec
- Replaces the deprecated
-
dart:io
-
dart:html
Element
methods,appendHtml
andinsertAdjacentHtml
now takenodeValidator
andtreeSanitizer
parameters, and the inputs are consistently sanitized. r45818 announcement
-
dart:isolate
- BREAKING The positional
priority
parameter ofIsolate.ping
andIsolate.kill
is now a named parameter namedpriority
. - BREAKING Removed the
Isolate.AS_EVENT
priority. Isolate
methodsping
andaddOnExitListener
now have a named parameterresponse
. r45092Isolate.spawnUri
added a named argumentchecked
.- Remove the experimental state of the API.
- BREAKING The positional
-
dart:profiler
- DEPRECATED- This library will be removed in 1.12. Use
dart:developer
instead.
- This library will be removed in 1.12. Use
Tool changes
- This is the first release that does not include the Eclipse-based Dart Editor. See dartlang.org/tools for alternatives.
- This is the last release that ships the (unsupported)
dart2dart (aka
dart2js --output-type=dart
) utility as part of dart2js
1.10.0 – 2015-04-29
Core library changes
-
dart:convert
-
dart:core
Uri.parse
addedstart
andend
positional arguments.
-
dart:html
- POTENTIALLY BREAKING
CssClassSet
method arguments must now be 'tokens', i.e. non-empty strings with no white-space characters. The implementation was incorrect for class names containing spaces. The fix is to forbid spaces and provide a faster implementation. Announcement
- POTENTIALLY BREAKING
-
dart:io
ProcessResult
now exposes a constructor.import
andIsolate.spawnUri
now supports the Data URI scheme on the VM.
Tool Changes
pub
-
Running
pub run foo
within a package now runs thefoo
executable defined by thefoo
package. The previous behavior ranbin/foo
. This makes it easy to run binaries in dependencies, for instancepub run test
. -
On Mac and Linux, signals sent to
pub run
and forwarded to the child command.
1.9.3 – 2015-04-14
This is a bug fix release which merges a number of commits from bleeding_edge
.
-
dart2js: Addresses as issue with minified Javascript output with CSP enabled - r44453
-
Editor: Fixes accidental updating of files in the pub cache during rename refactoring - r44677
-
Editor: Fix for issue 23032 regarding skipped breakpoints on Windows - r44824
-
dart:mirrors: Fix
MethodMirror.source
when the method is on the first line in a script - r44957, r44976 -
pub: Fix for issue 23084: Pub can fail to load transformers necessary for local development - r44876
1.9.1 – 2015-03-25
Language changes
-
Support for
async
,await
,sync*
,async*
,yield
,yield*
, andawait for
. See the the language tour for more details. -
Enum support is fully enabled. See the language tour for more details.
Tool changes
-
The formatter is much more comprehensive and generates much more readable code. See its tool page for more details.
-
The analysis server is integrated into the IntelliJ plugin and the Dart editor. This allows analysis to run out-of-process, so that interaction remains smooth even for large projects.
-
Analysis supports more and better hints, including unused variables and unused private members.
Core library changes
Highlights
-
There's a new model for shared server sockets with no need for a
Socket
reference. -
A new, much faster regular expression engine.
-
The Isolate API now works across the VM and
dart2js
.
Details
For more information on any of these changes, see the corresponding documentation on the Dart API site.
-
dart:async
:-
Future.wait
added a new named argument,cleanUp
, which is a callback that releases resources allocated by a successfulFuture
. -
The
SynchronousStreamController
class was added as an explicit name for the type returned when thesync
argument is passed tonew StreamController
.
-
-
dart:collection
: Thenew SplayTreeSet.from(Iterable)
constructor was added. -
dart:convert
:Utf8Encoder.convert
andUtf8Decoder.convert
added optionalstart
andend
arguments. -
dart:core
:-
RangeError
added new static helper functions:checkNotNegative
,checkValidIndex
,checkValidRange
, andcheckValueInInterval
. -
int
added themodPow
function. -
String
added thereplaceFirstMapped
andreplaceRange
functions.
-
-
dart:io
:-
Support for locking files to prevent concurrent modification was added. This includes the
File.lock
,File.lockSync
,File.unlock
, andFile.unlockSync
functions as well as theFileLock
class. -
Support for starting detached processes by passing the named
mode
argument (aProcessStartMode
) toProcess.start
. A process can be fully attached, fully detached, or detached except for its standard IO streams. -
HttpServer.bind
andHttpServer.bindSecure
added thev6Only
named argument. If this is true, only IPv6 connections will be accepted. -
HttpServer.bind
,HttpServer.bindSecure
,ServerSocket.bind
,RawServerSocket.bind
,SecureServerSocket.bind
andRawSecureServerSocket.bind
added theshared
named argument. If this is true, multiple servers or sockets in the same Dart process may bind to the same address, and incoming requests will automatically be distributed between them. -
Deprecation: the experimental
ServerSocketReference
andRawServerSocketReference
classes, as well as getters that returned them, are marked as deprecated. Theshared
named argument should be used instead. These will be removed in Dart 1.10. -
Socket.connect
andRawSocket.connect
added thesourceAddress
named argument, which specifies the local address to bind when making a connection. -
The static
Process.killPid
method was added to kill a process with a given PID. -
Stdout
added thenonBlocking
instance property, which returns a non-blockingIOSink
that writes to standard output.
-
-
dart:isolate
:-
The static getter
Isolate.current
was added. -
The
Isolate
methodsaddOnExitListener
,removeOnExitListener
,setErrorsFatal
,addOnErrorListener
, andremoveOnErrorListener
now work on the VM. -
Isolates spawned via
Isolate.spawn
now allow most objects, including top-level and static functions, to be sent between them.
-
1.8.5 – 2015-01-21
-
Code generation for SIMD on ARM and ARM64 is fixed.
-
A possible crash on MIPS with newer GCC toolchains has been prevented.
-
A segfault when using
rethrow
was fixed (issue 21795).
1.8.3 – 2014-12-10
-
Breakpoints can be set in the Editor using file suffixes (issue 21280).
-
IPv6 addresses are properly handled by
HttpClient
indart:io
, fixing a crash in pub (issue 21698). -
Issues with the experimental
async
/await
syntax have been fixed. -
Issues with a set of number operations in the VM have been fixed.
-
ListBase
indart:collection
always returns anIterable
with the correct type argument.
1.8.0 – 2014-11-28
-
dart:collection
:SplayTree
added thetoSet
function. -
dart:convert
: TheJsonUtf8Encoder
class was added. -
dart:core
:-
The
IndexError
class was added for errors caused by an index being outside its expected range. -
The
new RangeError.index
constructor was added. It forwards tonew IndexError
. -
RangeError
added three new properties.invalidProperty
is the value that caused the error, andstart
andend
are the minimum and maximum values that the value is allowed to assume. -
new RangeError.value
andnew RangeError.range
added an optionalmessage
argument. -
The
new String.fromCharCodes
constructor added optionalstart
andend
arguments.
-
-
dart:io
:-
Support was added for the Application-Layer Protocol Negotiation extension to the TLS protocol for both the client and server.
-
SecureSocket.connect
,SecureServerSocket.bind
,RawSecureSocket.connect
,RawSecureSocket.secure
,RawSecureSocket.secureServer
, andRawSecureServerSocket.bind
added asupportedProtocols
named argument for protocol negotiation. -
RawSecureServerSocket
added asupportedProtocols
field. -
RawSecureSocket
andSecureSocket
added aselectedProtocol
field which contains the protocol selected during protocol negotiation.
-
1.7.0 – 2014-10-15
Tool changes
-
pub
now generates binstubs for packages that are globally activated so that they can be put on the user'sPATH
and used as normal executables. See thepub global activate
documentation. -
When using
dart2js
, deferred loading now works with multiple Dart apps on the same page.
Core library changes
-
dart:async
:Zone
,ZoneDelegate
, andZoneSpecification
added theerrorCallback
function, which allows errors that have been programmatically added to aFuture
orStream
to be intercepted. -
dart:io
:-
Breaking change:
HttpClient.close
must be called for all clients or they will keep the Dart process alive until they time out. This fixes the handling of persistent connections. Previously, the client would shut down immediately after a request. -
Breaking change:
HttpServer
no longer compresses all traffic by default. The newautoCompress
property can be set totrue
to re-enable compression.
-
-
dart:isolate
:Isolate.spawnUri
added the optionalpackageRoot
argument, which controls how it resolvespackage:
URIs.