You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[analysis_server] When running server from source in integration tests, pre-compile server
When working on the analysis server, you can set the `TEST_SERVER_SNAPSHOT` env var to `false` to spawn the server from source (`bin/server.dart`) instead of running the snapshot, which allows easily running the integration tests (which spawn the server in a separate process) from the IDE without having to run (and wait for) builds.
However running from source like this can be quite slow because every test that spawns the server results in it being compiled on-the-fly. This change instead uses `dart compile` to compile the server from source to a temp file the first time we return the path, and then subsequently returns the same path.
On my Windows PC, this reduces the time to run the integration tests (with the env variable set) from 17min to 2min.
Change-Id: I612d1a978d22d214dc086962d8c9eb2e7dfe8239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434080
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
0 commit comments