Skip to main content

Posts

Showing posts from August, 2016

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Dart 1.19: Improved developer experiences

Dart 1.19 is now available. Get it now! We closely collaborate with the Flutter team on providing the best developer experience for Dart for Mobile. This includes language changes that optimize the Flutter development experience. Dart code for Flutter apps commonly have long argument lists. Before 1.19, a trailing comma was not allowed after the last argument. This made it really tedious when removing the last argument, or when reordering the arguments. With 1.19 we introduce support for an optional trailing comma after the last argument of a call and the last parameter of a function declaration. This makes code editing much easier: If you've struggled with package directory symlinks, you're in luck. You can now opt-out of creating a package directory and the associated symlinks scattered around your project directories. The flag to provide to pub get and pub upgrade is --no-packages-dir . We've posted a detailed writeup of the changes if you'd like more infor...

So Long, Symlinks!

Long ago, back in the dawn of time, when nary a Dart file was to be found outside of the SDK repository , imports in Dart only supported file paths. As the language got older and an ecosystem began to grow around it, it quickly became clear that paths weren’t enough: Dart needed a way to import libraries that didn’t care about the location of the file doing the importing. The language team talked to the VM team and they came up with a solution. In addition to file: URIs, Dart would support a new package: scheme by looking for packages in a packages/ directory next to the entrypoint, wherever that happened to be. This worked pretty well—well enough to form the foundation for the pub package manager, written by Bob and myself. But it also had flaws. A lot of symlinks had to be generated all over every package—the test package currently contains about four hundred. Not only was this messy, many tools ended up following the symlinks and corrupting the package cache. So the team cam...