Add build warning for non-debug desktop builds (#38932)

When building in profile or release mode on desktop, add a prominent
warning that it's actually a debug build. This is to help address issues
with people being unaware of the current state of builds due to
following third-party guides rather than official documentation.

macOS is not included since PRs are in flight for macOS release support.
This commit is contained in:
stuartmorgan
2019-08-20 20:16:29 -07:00
committed by GitHub
parent f515bf6abc
commit 01530928f0
4 changed files with 83 additions and 0 deletions

View File

@@ -38,6 +38,15 @@ export PROJECT_DIR=${linuxProject.project.directory.path}
..createSync(recursive: true)
..writeAsStringSync(buffer.toString());
if (!buildInfo.isDebug) {
const String warning = '🚧 ';
printStatus(warning * 20);
printStatus('Warning: Only debug is currently implemented for Linux. This is effectively a debug build.');
printStatus('See https://github.com/flutter/flutter/issues/38478 for details and updates.');
printStatus(warning * 20);
printStatus('');
}
// Invoke make.
final Stopwatch sw = Stopwatch()..start();
final Process process = await processManager.start(<String>[

View File

@@ -42,6 +42,15 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {S
'Please run `flutter doctor` for more details.');
}
if (!buildInfo.isDebug) {
const String warning = '🚧 ';
printStatus(warning * 20);
printStatus('Warning: Only debug is currently implemented for Windows. This is effectively a debug build.');
printStatus('See https://github.com/flutter/flutter/issues/38477 for details and updates.');
printStatus(warning * 20);
printStatus('');
}
final String buildScript = fs.path.join(
Cache.flutterRoot,
'packages',