Discussion:
[dart-misc] [dart-announce] Dart 1.19 is now available
'Michael Thomsen' via Dart Announcements
2016-08-26 23:14:24 UTC
Permalink
Dart SDK version 1.19 has been released.


The *release announcement*
<http://news.dartlang.org/2016/08/dart-119-improved-developer-experiences.html>
and the changelog
<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#1190> have all of
the details!

---
<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#1190>1.19.0
<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#language-changes>Language
changes

- The language now allows a trailing comma after the last argument of a
call and the last parameter of a function declaration. This can make long
argument or parameter lists easier to maintain, as commas can be left as-is
when reordering lines. For details, see SDK issue 26644
<https://github.com/dart-lang/sdk/issues/26644>.

<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#tool-changes>Tool
Changes

-

dartfmt - upgraded to v0.2.9+1
- Support trailing commas in argument and parameter lists.
- Gracefully handle read-only files.
- About a dozen other bug fixes.
-

Pub
-

Added a --no-packages-dir flag to pub get, pub upgrade, and pub
downgrade. When this flag is passed, pub will not generate a packages/ directory,
and will remove that directory and any symlinks to it if they exist. Note
that this replaces the unsupported --no-package-symlinks flag.
-

Added the ability for packages to declare a constraint on the Flutter
<https://flutter.io/> SDK:

environment:
flutter: ^0.1.2
sdk: >=1.19.0 <2.0.0

A Flutter constraint will only be satisfiable when pub is running in
the context of the flutter executable, and when the Flutter SDK
version matches the constraint.
-

Added sdk as a new package source that fetches packages from a
hard-coded SDK. Currently only the flutter SDK is supported:

dependencies:
flutter_driver:
sdk: flutter
version: ^0.0.1

A Flutter sdk dependency will only be satisfiable when pub is running
in the context of the flutter executable, and when the Flutter SDK
contains a package with the given name whose version matches the constraint.
-

tar files on Linux are now created with 0 as the user and group IDs.
This fixes a crash when publishing packages while using Active Directory.
-

Fixed a bug where packages from a hosted HTTP URL were considered the
same as packages from an otherwise-identical HTTPS URL.
-

Fixed timer formatting for timers that lasted longer than a minute.
-

Eliminate some false negatives when determining whether global
executables are on the user's executable path.
-

dart2js
- dart2dart (aka dart2js --output-type=dart) has been removed (this was
deprecated in Dart 1.11).

<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#dart-vm>Dart VM

- The dependency on BoringSSL has been rolled forward. Going forward,
builds of the Dart VM including secure sockets will require a compiler with
C++11 support. For details, see the Building wiki page
<https://github.com/dart-lang/sdk/wiki/Building>.

<https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#strong-mode>Strong
Mode

-

New feature - an option to disable implicit casts (SDK issue 26583
<https://github.com/dart-lang/sdk/issues/26583>), see the documentation
<https://github.com/dart-lang/dev_compiler/blob/master/doc/STATIC_SAFETY.md#disable-implicit-casts> for
usage instructions and examples.
-

New feature - an option to disable implicit dynamic (SDK issue 25573
<https://github.com/dart-lang/sdk/issues/25573>), see the documentation
<https://github.com/dart-lang/dev_compiler/blob/master/doc/STATIC_SAFETY.md#disable-implicit-dynamic> for
usage instructions and examples.
-

Breaking change - infer generic type arguments from the constructor
invocation arguments (SDK issue 25220
<https://github.com/dart-lang/sdk/issues/25220>).

var map = new Map<String, String>();
// infer: Map<String, String>var otherMap = new Map.from(map);

-

Breaking change - infer local function return type (SDK issue 26414
<https://github.com/dart-lang/sdk/issues/26414>).

void main() {
// infer: return type is int
f() { return 40; }
int y = f() + 2; // type checks
print(y);
}

-

Breaking change - allow type promotion from a generic type parameter
(SDK issue 26414 <https://github.com/dart-lang/sdk/issues/26965>).

void fn/*<T>*/(/*=T*/ object) {
if (object is String) {
// Treat `object` as `String` inside this block.
// But it will require a cast to pass it to something that expects `T`.
print(object.substring(1));
}
}

-

Breaking change - smarter inference for Future.then (SDK issue 25944
<https://github.com/dart-lang/sdk/issues/25944>). Previous workarounds
that use async/await or.then/*<Future<SomeType>>*/ should no longer be
necessary.

// This will now infer correctly.
Future<List<int>> t2 = f.then((_) => [3]);// This infers too.
Future<int> t2 = f.then((_) => new Future.value(42));

-

Breaking change - smarter inference for async functions (SDK issue 25322
<https://github.com/dart-lang/sdk/issues/25322>).

void test() async {
List<int> x = await [4]; // was previously inferred
List<int> y = await new Future.value([4]); // now inferred too
}

-

Breaking change - sideways casts are no longer allowed (SDK issue 26120
<https://github.com/dart-lang/sdk/issues/26120>).
--
For more news and information, visit https://plus.google.com/+dartlang

To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Danny Tuppeny
2016-08-27 08:24:28 UTC
Permalink
On Sat, 27 Aug 2016 at 00:14 'Michael Thomsen' via Dart Announcements <
Post by 'Michael Thomsen' via Dart Announcements
-
Pub
-
Added a --no-packages-dir flag to pub get, pub upgrade, and pub
downgrade. When this flag is passed, pub will not generate a
packages/ directory, and will remove that directory and any
symlinks to it if they exist. Note that this replaces the unsupported
--no-package-symlinks flag.
I really hate that packages folder (or rather, all 50 of them that appear
in my editors tree! :)). I was excited by this change but it seems that
debugging via pub is not possible and this resolution only works using pub
run? There's two-year-old issue about this year:

https://github.com/dart-lang/pub/issues/1018

Which is marked as blocked on this issue:

https://github.com/dart-lang/sdk/issues/23320

Yet that issue was closed as NotPlanned.

Does this mean we won't get support for attaching debuggers via pub? Will
there be an alternative?
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Bob Nystrom' via Dart Misc
2016-08-29 15:54:29 UTC
Permalink
Post by 'Michael Thomsen' via Dart Announcements
I really hate that packages folder (or rather, all 50 of them that appear
in my editors tree! :)).
Me too. I never ever ever liked them.
Post by 'Michael Thomsen' via Dart Announcements
I was excited by this change but it seems that debugging via pub is not
possible and this resolution only works using pub run?
If your command line app supports running directly in the VM without going
through pub run—in other words, it doesn't use transformers—it should work
without a packages directory as well. As long as you have a .packages file,
you should be able to do:

$ dart bin/your_app.dart

Cheers!

– bob
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Danny Tuppeny
2016-08-29 16:16:35 UTC
Permalink
Post by 'Bob Nystrom' via Dart Misc
If your command line app supports running directly in the VM without going
through pub run—in other words, it doesn't use transformers—it should work
without a packages directory as well. As long as you have a .packages file,
$ dart bin/your_app.dart
Yeah, Devon told me the VM was able to read .packages... From the blog post
I thought it was only pub. This will probably do fine then :-)
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2016-08-29 16:14:42 UTC
Permalink
Post by Danny Tuppeny
On Sat, 27 Aug 2016 at 00:14 'Michael Thomsen' via Dart Announcements <
Post by 'Michael Thomsen' via Dart Announcements
-
Pub
-
Added a --no-packages-dir flag to pub get, pub upgrade, and pub
downgrade. When this flag is passed, pub will not generate a
packages/ directory, and will remove that directory and any
symlinks to it if they exist. Note that this replaces the unsupported
--no-package-symlinks flag.
I really hate that packages folder (or rather, all 50 of them that appear
in my editors tree! :)). I was excited by this change but it seems that
debugging via pub is not possible and this resolution only works using pub
https://github.com/dart-lang/pub/issues/1018
https://github.com/dart-lang/sdk/issues/23320
Yet that issue was closed as NotPlanned.
Does this mean we won't get support for attaching debuggers via pub? Will
there be an alternative?
Danny: we're looking to bring this request back for related reasons. Stay
tuned.
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Danny Tuppeny
2016-08-29 16:17:42 UTC
Permalink
Post by Danny Tuppeny
Does this mean we won't get support for attaching debuggers via pub? Will
Post by Danny Tuppeny
there be an alternative?
Danny: we're looking to bring this request back for related reasons. Stay
tuned.
I'm curious now... Since the VM can read .packages and tests can already be
run using dart.exe instead of via pub; what are the remaining
advantages/reasons to use "pub run" over just "dart"?
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2016-08-29 16:23:14 UTC
Permalink
On Mon, 29 Aug 2016 at 17:15 'Kevin Moore' via Dart Misc <
Post by Danny Tuppeny
Does this mean we won't get support for attaching debuggers via pub? Will
Post by Danny Tuppeny
there be an alternative?
Danny: we're looking to bring this request back for related reasons. Stay
tuned.
I'm curious now... Since the VM can read .packages and tests can already
be run using dart.exe instead of via pub; what are the remaining
advantages/reasons to use "pub run" over just "dart"?
You ask good questions. :-)


- Will make sure your pubspec.lock file is up-to-date given the
pubspec.yaml and your current VM
- Allows running transformers (which is not something we encourage at
this point)

The big win is running something like 'pub test' where test is a package
you depend on, not a binary in your app.

If you're just running 'myapp/bin/my_binary.dart' just use 'dart
bin/my_binary.dart'
--
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
---
You received this message because you are subscribed to a topic in the
Google Groups "Dart Misc" group.
To unsubscribe from this topic, visit https://groups.google.com/a/
dartlang.org/d/topic/misc/jlyTSLM5eyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Danny Tuppeny
2016-08-29 16:27:26 UTC
Permalink
Post by 'Kevin Moore' via Dart Misc
- Will make sure your pubspec.lock file is up-to-date given the
pubspec.yaml and your current VM
- Allows running transformers (which is not something we encourage at
this point)
Gotcha, ta!
The big win is running something like 'pub test' where test is a package
you depend on, not a binary in your app.
Is "pub test" supposed to work? I thought it did, but I always seem to have
to do "pub run test"? I assumed it had changed but now I wonder if I've
just missed setting something up?
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Kevin Moore' via Dart Misc
2016-08-29 16:33:17 UTC
Permalink
On Mon, 29 Aug 2016 at 17:23 'Kevin Moore' via Dart Misc <
Post by 'Kevin Moore' via Dart Misc
- Will make sure your pubspec.lock file is up-to-date given the
pubspec.yaml and your current VM
- Allows running transformers (which is not something we encourage at
this point)
Gotcha, ta!
The big win is running something like 'pub test' where test is a package
you depend on, not a binary in your app.
Is "pub test" supposed to work? I thought it did, but I always seem to
have to do "pub run test"? I assumed it had changed but now I wonder if
I've just missed setting something up?
Sorry, yes "pub run test" :-)
--
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
---
You received this message because you are subscribed to a topic in the
Google Groups "Dart Misc" group.
To unsubscribe from this topic, visit https://groups.google.com/a/
dartlang.org/d/topic/misc/jlyTSLM5eyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...