'Bob Nystrom' via Dart Misc
2015-07-24 20:31:05 UTC
I just published a new version of the Dart formatter. It is not in the SDK
yet, but it is, I believe, very close to what I will bring into the 1.12
version of Dart.
Compared to the last release candidate, this one fixes another thirteen
bugs. It also has a new optimized line splitter. Compared to the old one,
it:
- Produces better output in some complex cases :)
- Produces much faster output in most cases :D
- Is slower in some bad cases :(
- But has better worst case performance in the nastiest cases :-/
It's also a much simpler algorithm
<https://github.com/dart-lang/dart_style/blob/master/lib/src/line_splitter.dart#L22-L87>
and easier to maintain. The previous one was a highly recursive dynamic
programming + memoization puzzle box that made my brain hurty every time I
had to fix a bug in it.
I would love some feedback on how it works on your code before I ship it in
the SDK. You can try it out like so:
$ pub global activate dart_style 0.2.0-rc.2
$ darformat <your stuff>
(Using "dartformat" instead of "dartfmt" ensures you run the one from the
package and not "dartfmt" from the SDK.)
If you run into issues <https://github.com/dart-lang/dart_style/issues>,
questions, etc. please let me know. I have a couple more fixes and
optimizations in mind, but they are a bit of work so I'm trying to figure
out if I need to squeeze them in before 0.2.0.
Thanks!
- bob
yet, but it is, I believe, very close to what I will bring into the 1.12
version of Dart.
Compared to the last release candidate, this one fixes another thirteen
bugs. It also has a new optimized line splitter. Compared to the old one,
it:
- Produces better output in some complex cases :)
- Produces much faster output in most cases :D
- Is slower in some bad cases :(
- But has better worst case performance in the nastiest cases :-/
It's also a much simpler algorithm
<https://github.com/dart-lang/dart_style/blob/master/lib/src/line_splitter.dart#L22-L87>
and easier to maintain. The previous one was a highly recursive dynamic
programming + memoization puzzle box that made my brain hurty every time I
had to fix a bug in it.
I would love some feedback on how it works on your code before I ship it in
the SDK. You can try it out like so:
$ pub global activate dart_style 0.2.0-rc.2
$ darformat <your stuff>
(Using "dartformat" instead of "dartfmt" ensures you run the one from the
package and not "dartfmt" from the SDK.)
If you run into issues <https://github.com/dart-lang/dart_style/issues>,
questions, etc. please let me know. I have a couple more fixes and
optimizations in mind, but they are a bit of work so I'm trying to figure
out if I need to squeeze them in before 0.2.0.
Thanks!
- 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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.