[dart-announce] Dart v1.3 Release Notes

500 views
Skip to first unread message

Kevin Moore

unread,
Apr 9, 2014, 1:18:32 PM4/9/14
to anno...@dartlang.org

Release announcement: http://news.dartlang.org/2014/04/dart-13-dramatically-improves-server.html


Newsworthy changes:


SDK changes include:

  • dart:core

    • DateTime.toIso8601String

    • String: trimLeft, trimRight, padLeft, padRight, * operator

    • new Sink<T>

    • Iterable.generate ctor arg [generator] is now optional

  • dart:async

    • Stream.asyncMap

    • Stream.asyncExpand

    • Zone values don't have to have symbol keys

  • dart:io

    • ContentType: exposes TEXT, HTML, JSON, BINARY

    • Process.exitCode getter

    • Socket added List<int> rawAddress


Editor changes include:

  • Support for Angular code completion.

  • Improved Angular analysis and refactoring support.

  • Improved debugger support when connected to DevTools.

  • Use UTF-8 as the default charset for Dart projects.

  • Run as JavaScript now uses pub serve.

  • Multiple new Quick Fixes and Quick Assists.

  • Multiple code completion fixes and enhancements.

  • “Run as JavaScript” uses pub serve

  • Improved performance for:

    • very large individual Dart files.

    • projects with very large numbers of Dart files.

  • Added debugger preferences to:

    • ignore exceptions from javascript.

    • toggle calling toString().


Pub changes include:

  • Pubspec configuration to prevent a transformer from running on certain assets. (See “How to Exclude Assets” here.)

  • Transformers can control whether or not they consume their primary input.

  • Optimize startup of pub build and serve, especially in packages with many files.

  • Source map support in pub build and serve. This means a debug build of your package will include the Dart core library sources.


Documentation changes include:

  • New article: Zones

  • New/improved tools docs:


dart2js changes include:

  • Bug fixes.

  • Better type inference for maps.

  • Smaller code size when using Function.apply.

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

Kevin Moore

unread,
Apr 9, 2014, 1:20:32 PM4/9/14
to mi...@dartlang.org

W. Brian Gourlie

unread,
Apr 9, 2014, 4:24:26 PM4/9/14
to mi...@dartlang.org, anno...@dartlang.org, e...@dartlang.org
Just updated.  Breakpoints aren't working anymore and my angular app fails to load with no errors being thrown, the view just never gets loaded.  Are there any obvious reasons these things might be happening before I dig in and figure out what's up?

Brian

Kasper Lund

unread,
Apr 10, 2014, 12:32:01 AM4/10/14
to General Dart Discussion, W. Brian Gourlie
Hi Brian,

I know of no obvious reason for the behavior you're seeing, so if you
could file a bug report we'd be very interested in getting to the
bottom of the issue quickly.

Cheers,
Kasper
> --
> 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.

Keerti Parthasarathy

unread,
Apr 10, 2014, 8:41:12 AM4/10/14
to General Dart Discussion

Brian,

Could you delete the .dartium directory located in your home dir, restart DartEditor and see if you can hit any breakpoints?

W. Brian Gourlie

unread,
Apr 10, 2014, 10:18:17 AM4/10/14
to mi...@dartlang.org, W. Brian Gourlie
Hi Kasper,

Turns out the angular specific issue is due to this bug:  https://code.google.com/p/dart/issues/detail?id=18067.  I will be trying Keerti's suggestion re: breakpoints later tonight.  

I appreciate the help!

Brian

Moises Belchin

unread,
Apr 10, 2014, 12:14:27 PM4/10/14
to General Dart Discussion, W. Brian Gourlie
Generating JS (pub build) with Dart 1.3 in Windows 7 pro 32 I get this error:

(Exception: Cannot read file:///C:/Users/global_lib.dart because it is outside of the build environment.)

How can i solve it? I have a global lib for all my projects and I've located in another directory.

Thanks.

------------------------------------------------------------------------
Un Saludo.
Moisés Belchín.

Bob Nystrom

unread,
Apr 10, 2014, 12:47:11 PM4/10/14
to General Dart Discussion, W. Brian Gourlie

On Thu, Apr 10, 2014 at 9:14 AM, Moises Belchin <moises...@gmail.com> wrote:
(Exception: Cannot read file:///C:/Users/global_lib.dart because it is outside of the build environment.)

How can i solve it? I have a global lib for all my projects and I've located in another directory.

The reason you get this error is that there are some scenarios where explicit absolute file paths don't work. For example, you:

1. Spin up a dev server, either pub serve or one of your own concoction.
2. Open your application in Dartium over HTTP.

When you do that, the browser is not going to reach out and start reading random stuff from your file system since the entrypoint URL is an HTTP one. There are scenarios where it does work (like opening your application in a browser using "file:" URLs, or compiling it to JS first.) But we didn't want to lead people down a garden path of scenarios that did work only to trip them up later when they run into a case where it doesn't.

The solution is pretty simple: move that library into a package. It doesn't have to be published anywhere. You can leave the package on your local file system and then use a path dependency to get to it.

Cheers!

- bob

W. Brian Gourlie

unread,
Apr 10, 2014, 2:47:48 PM4/10/14
to mi...@dartlang.org
Hi Keerti, 

I deleted my .dartium directory and I'm still unable to get a breakpoint to hit.  This is a dartium launch pointing to a URL hosted by pub serve (not a pub serve launch configuration, mind you).  This had been working previously.   I tried a right-click "Run in dartium" and it worked.  Hmmm...

Kasper Lund

unread,
Apr 10, 2014, 3:09:50 PM4/10/14
to mi...@dartlang.org

Can you check which version of Dartium you're running? Are you using Windows?

We have seen issue where Dartium didn't get updated with the new Editor because it was running during the upgrade.

Cheers,
Kasper

Moises Belchin

unread,
Apr 11, 2014, 3:32:07 AM4/11/14
to General Dart Discussion
Hi Bob,

Thanks for the answer, I supposed would have to do something like that.

Since 1.1 every new version of Dart makes me work and work although no breaking changes are announced :-)

Regards.

------------------------------------------------------------------------
Un Saludo.
Moisés Belchín.


--

Moises Belchin

unread,
Apr 11, 2014, 7:56:27 AM4/11/14
to General Dart Discussion
I'd like to do another question :-)

Now pub build copies all my .dart files from web/ to build/web/ as well as .js files.
Is there any flag to avoid that? I mean, only generate .js files into build/web/

Thanks and regards.

------------------------------------------------------------------------
Un Saludo.
Moisés Belchín.


Charles Xie

unread,
Apr 12, 2014, 7:20:37 PM4/12/14
to mi...@dartlang.org, anno...@dartlang.org, e...@dartlang.org
Run as JavaScript no longer creates a Building folder. Where can I access the compiled JavaScript stuff? I need the app to run locally.

Thanks.

Don Olmstead

unread,
Apr 12, 2014, 7:22:29 PM4/12/14
to mi...@dartlang.org
You need to run pub build. You can do this through the editor or command line.


On Sat, Apr 12, 2014 at 4:20 PM, Charles Xie <qx...@concord.org> wrote:
Run as JavaScript no longer creates a Building folder. Where can I access the compiled JavaScript stuff? I need the app to run locally.

Thanks.

--

Bob Nystrom

unread,
Apr 14, 2014, 12:41:03 PM4/14/14
to General Dart Discussion

On Fri, Apr 11, 2014 at 4:56 AM, Moises Belchin <moises...@gmail.com> wrote:
Now pub build copies all my .dart files from web/ to build/web/ as well as .js files.
Is there any flag to avoid that? I mean, only generate .js files into build/web/

It should only do that in a debug build ("pub build --mode debug"). In release mode (the normal more for pub build), .dart files should be stripped out.

We've got some plans to make that more explicitly configurable, but haven't gotten started on it yet.

Cheers!

- bob

Moises Belchin

unread,
Apr 15, 2014, 5:33:18 AM4/15/14
to General Dart Discussion
I don't know in which mode is running pub build. I only right click pubspec.yaml from Dart editor and select Pub build.

So there's no way to pass command line flags to `pub build` when run via editor?

Thanks.

------------------------------------------------------------------------
Un Saludo.
Moisés Belchín.


--

Keerti Parthasarathy

unread,
Apr 15, 2014, 10:48:22 AM4/15/14
to General Dart Discussion
The pub build in editor is run in --debug mode and currently there is no way to configure pub build via the editor. Do open an issue at dartbug.com/new if you feel this should be supported in the editor. 
--
Keerti

Moises Belchin

unread,
Apr 15, 2014, 10:59:58 AM4/15/14
to General Dart Discussion

------------------------------------------------------------------------
Un Saludo.
Moisés Belchín.


Reply all
Reply to author
Forward
0 new messages