-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
When exploring dart run -h, I found this:
-r, --resident Enable faster startup times with the resident frontend compiler.
See 'dart compilation-server -h' for more information.
So I ran dart compilation-server -h and saw the options to start or stop the server. This surprised me because I couldn't find compilation-server in dart --help, so it felt a bit hidden. But it's a great feature -- it sped up my start-up time from 20s to < 1s (albeit, on a Raspberry Pi).
When running dart run -r for the first time in a session, I get the following error:
$ dart run -r
Failed to build bin\subsystems.dart:
SocketException: The remote computer refused the network connection.
(OS Error: The remote computer refused the network connection.
, errno = 1225), address = 127.0.0.1, port = 42800
Running the command again works fine, I imagine this is starting up the server but not waiting long enough for it to connect. The next time the command runs, I get the message that the server is running, but on a different port than what was reported in the error.
I get why keeping Dart running as a daemon isn't the default option, but I think it's useful enough to be polished and promoted.
cc @mraleph
General info
- Dart 3.2.2 (stable) (Tue Nov 28 11:22:54 2023 +0000) on "windows_x64"
- on windows / "Windows 10 Home" 10.0 (Build 22631)
- locale is en-US
Process info
| Memory | CPU | Elapsed time | Command line |
|---|---|---|---|
| 81 MB | -- | dart.exe |