Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface Windows build errors in non-verbose mode #63707

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

stuartmorgan
Copy link
Contributor

Description

Makes Windows builds extract things that look like warnings and errors from stdout, where MSBuild sends all output, and reports them as errors to the logger (essentially making them behave as if they had gone to stderr). This means that native build failures will no longer be completely invisible in non-verbose mode.

Also fixes an existing warning so that it won't show up in every build: The custom step in the Windows template CMake to do the re-entrant Flutter step includes a dummy output file to force the step to run every time. This causes a warning from VS. Marking it SYMBOLIC to indicate that it's not a real output file causes CMake to generate that VS step with the output validation step disabled so that it won't warn.

Related Issues

Fixes #33583

Tests

I added the following tests: Tests the regex extraction against sample normal and error lines, and ensures that it properly finds only the latter.

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change.

The custom step in the Windows template CMake to do the re-entrant
Flutter step includes a dummy output file to force the step to run every
time. This causes a warning from VS. Marking it SYMBOLIC to indicate
that it's not a real output file causes CMake to generate that VS step
with the output validation step disabled so that it won't warn.
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 13, 2020
@stuartmorgan
Copy link
Contributor Author

Having to always use verbose mode on Windows finally annoyed me one too many times.

@stuartmorgan stuartmorgan added a: build Building flutter applications with the tool a: desktop Running on desktop platform-windows Building on or for Windows specifically labels Aug 13, 2020
@jonahwilliams
Copy link
Member

Having to always use verbose mode on Windows finally annoyed me one too many times.

I guess that is how progress is made

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 6f0cfc9 into flutter:master Aug 14, 2020
@stuartmorgan stuartmorgan deleted the windows-error-surfacing branch August 14, 2020 02:48
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: build Building flutter applications with the tool a: desktop Running on desktop platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error surfacing from Windows builds
4 participants