Skip to content

Conversation

@stuartmorgan-g
Copy link
Contributor

Description

Currently Linux builds override the default BUILD mode by putting it in
the generated config. That makes it sticky for manual runs of make,
which is inconsistent with how other platforms work.

Instead, pass the build mode as a command-line override, the same way
someone would if building directly with make. This makes the flow of
controlling the mode less confusing.

Minor incidental cleanup:

  • Removes runInShell: true from the make call, as it's not needed, and running through the shell is generally more error-prone.
  • Passes profile for Profile builds, rather than release. It currently won't build differently, but it's one less place that there's a hard-coded bypass of profile mode to clean up later.

Related Issues

Fixes #41528

Tests

I added the following tests: verify that release, profile, and debug all pass the correct override.

Also pulled some common test setup for the Linux build tests into helper functions.

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 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

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

Currently Linux builds override the default BUILD mode by putting it in
the generated config. That makes it sticky for manual runs of make,
which is inconsistent with how other platforms work.

Instead, pass the build mode as a command-line override, the same way
someone would if building directly with make. This makes the flow of
controlling the mode less confusing.

Fixes flutter#41528
@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 29, 2019
Copy link
Contributor

@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!

@stuartmorgan-g stuartmorgan-g merged commit d1761f1 into flutter:master Sep 30, 2019
@stuartmorgan-g stuartmorgan-g deleted the linux-no-build-in-make-config branch September 30, 2019 16:36
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Sep 30, 2019
Currently Linux builds override the default BUILD mode by putting it in
the generated config. That makes it sticky for manual runs of make,
which is inconsistent with how other platforms work.

Instead, pass the build mode as a command-line override, the same way
someone would if building directly with make. This makes the flow of
controlling the mode less confusing.

Fixes flutter#41528
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move BUILD mode out of Linux generated makefile

4 participants