7958fe1a15
https://dart-review.googlesource.com/c/sdk/+/372260 fixed `dartkp` invocations, but did not fix `dartk` due to conflicts with the `dart2analyzer` compiler. (Patchset 3 of that CL.) Try to land the same heuristic but guarded on if `compiler` is null. Closes: https://github.com/dart-lang/sdk/issues/56041 Change-Id: Ieba182d74cb0d1d846a3073f1a02ee9f958ef36d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372360 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com>