Dart SDK 2.7.0 released

119 views
Skip to first unread message

Michael Thomsen

unread,
Dec 11, 2019, 11:42:20 AM12/11/19
to Dart Announcements
Dart 2.7 has been released, with the following changelog notes:

Extension methods -- which we shipped in preview in 2.6.0 -- are no longer in preview, and are now officially supported as of 2.7.0. Learn more about them here:

https://medium.com/dartlang/extension-methods-2d466cd8b308

Language
  • Breaking ChangeStatic extension members are accessible when imported with a prefix (issue 671). In the extension method preview launch, importing a library with a prefix hid all extension members in addition to hiding the extension name, thereby making them inaccessible in the importing library except via the explicit override syntax. Based on user feedback, we have changed this to make extensions methods accessible even when imported with a prefix.

    // "thing.dart" class Thing { } extension Show on Thing { void show() { print("This is a thing"); } } // "client.dart" import "thing.dart" as p; void test() { p.Thing().show(); // Previously an error, now resolves to Show.show }
Core librariesdart:io
  • Breaking change: Added IOOverrides.serverSocketBind to aid in writing tests that wish to mock ServerSocket.bind.
Dart VM
  • New fields added to existing instances by a reload will now be initialized lazily, as if the field was a late field. This makes the initialization order program-defined, whereas previously it was undefined.
ToolsLinter

The Linter was updated to 0.1.104, which includes:

  • updated unnecessary_overrides to allow overrides when annotations (besides @override are specified)
  • updated file_names to allow names w/ leading _'s (and improved performance)
  • new lint: unnecessary_final
Pub
  • pub get generates .dart_tool/package_config.json in addition to .packages to support language versioning.

  • pub publish now warns about the old flutter plugin registration format.

  • pub publish now warns about the author field in pubspec.yaml being. obsolete.

  • Show a proper error message when git is not installed.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages