Skip to content
Brady Trainor edited this page Aug 14, 2019 · 5 revisions

On August 6th, 2019, dart-mode was split into two repos.

For now, melpa stable should have the combined mode, at https://stable.melpa.org/#/dart-mode.

dart-mode.el is now just basic indentation and syntax highlighting.

The features that required a dart server have been moved to https://github.com/bradyt/dart-server.

This includes the dart formatter. It should be enough to install the package and bind C-c C-o to dart-server-format.

For example, with

(with-eval-after-load "dart-mode"
  (define-key dart-mode-map (kbd "C-c C-o") 'dart-server-format))

The dart-server repo will hopefully be on melpa soon. You can check the status of the pull request at https://github.com/melpa/melpa/pull/6352.

Why was the project split?

One reason is so that the testing and .travis.yml for testing the indentation and syntax highlighting does not need an environment including dart executables, etc.

Another is that there are alternatives to all the components in dart-server, like LSP, etc. They may even provide formatters.

Eventually, we might split the formatter off from dart-server. Some CPU usage was seen being used by only using the formatter. This seems to reveal that just to find the dartfmt executable, dart-mode was starting a CPU intensive process. This is nearly ridiculous, and was only really discovered while attempting to only split the dart analysis tools out of dart-mode.el.

The dart-server repo should have more tests, including CI testing towards Windows. This does not seem appropriate for the parts that just provide basic indentation and syntax highlighting.

Likely this split will inconvenience some people, and perhaps I should have researched how to make the change smoother.