(logger: Logger, duringStartup = false)
| 8 | let isShowingAnalyzerError = false; |
| 9 | |
| 10 | export function reportAnalyzerTerminatedWithError(logger: Logger, duringStartup = false) { |
| 11 | if (isShowingAnalyzerError) |
| 12 | return; |
| 13 | isShowingAnalyzerError = true; |
| 14 | const prompt = duringStartup |
| 15 | ? "The Dart Analyzer could not be started." |
| 16 | : "The Dart Analyzer has terminated. Please [file an issue on GitHub](https://github.com/dart-lang/sdk/issues/new/choose) with any error from the end of the log."; |
| 17 | void promptToReloadExtension(logger, { |
| 18 | prompt, |
| 19 | offerLog: true, |
| 20 | severity: "ERROR", |
| 21 | specificLog: config.analyzerLogFile, |
| 22 | restartReason: ExtensionRestartReason.AnalyzerTerminated, |
| 23 | }).then(() => isShowingAnalyzerError = false); |
| 24 | } |
| 25 | |
| 26 | export async function getFlutterConfigValue<T>(logger: Logger, flutterSdkPath: string | undefined, folder: string, flutterConfigKey: string): Promise<T> { |
| 27 | if (!flutterSdkPath) { |
no test coverage detected