Improve Windows build failure message#36845
Improve Windows build failure message#36845zanderso merged 3 commits intoflutter:masterfrom GroovinChip:master
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. While there are exceptions to this rule, if this patch modifies code it is probably not an exception. Reviewers: Read the Tree Hygine page and make sure this patch meets those guidelines before LGTMing. /cc @dnfield |
|
@jonahwilliams Review please? Can't do it officially as I'm not a contributor. |
jonahwilliams
left a comment
There was a problem hiding this comment.
Please remove: please file an issue at https://github.com/flutter/flutter/issues/new/choose. Since this error could be anything from a flutter build error to a reconfigured app to a compilation error in platfrom code it doesn't really provide any more signal.
|
Done |
|
Thank you for the contribution @GroovinChip ! |
|
You're very welcome @jonahwilliams :D |
|
To further the goal of making Windows build logs available in the console, would it make sense to take the build_windows.dart: try {
process.stderr
.transform(utf8.decoder)
.transform(const LineSplitter())
.listen(printError);
process.stdout
.transform(utf8.decoder)
.transform(const LineSplitter())
.listen(printTrace);
result = await process.exitCode;
} finally {
status.cancel();
}
/**
* Returns the standard error stream of the process as a [:Stream:].
*/
Stream<List<int>> get stderr;I image we could get the contents of |
|
printError should already show up in the console above this message (if there was anything). It's possible we're dropping something on the floor before that. We would have to manually buffer to stderr output. |
|
So, somewhere in here, then? final Process process = await processManager.start(<String>[
buildScript,
vcvarsScript,
fs.path.basename(solutionPath),
configuration,
], workingDirectory: fs.path.dirname(solutionPath));I know that the EDIT: @jonahwilliams Perhaps we can use the Message Task to get |
|
That process call should already be logging all of the stderr. But it might be the case that we're not running the msbuild with the right verbosity. Let's land this change now, since it is simpler, and go further down the rabbit hole separately. |
Description
This PR improves the build failure message for Windows build targets. It suggests that the user run
flutter run -d windows -vto see a stack trace, and if that does not help the user solve the build failure it prompts the user to open an issue.Related Issues
Contributes to, but does not fully address, #33583
Tests
This PR does not change any behavior.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?