-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#52700Closed
Copy link
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.e: engine-toolEngine-specific tooling (i.e. `tools/engine_tool`).Engine-specific tooling (i.e. `tools/engine_tool`).engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team
Description
The current behavior of et is that --rbe defaults to true, but then, if true, is ignored if RBE is not configured:
// If RBE config files aren't in the tree, then disable RBE.
final String rbeConfigPath = p.join(
environment.engine.srcDir.path,
'flutter',
'build',
'rbe',
);This leads to really confusing behavior, where you think RBE is being used (and indeed the flag is set), but silently the CLI has internal heuristics that decide not to use it. For example, I thought it was enabled, but there was no output, and I was taxing my CPU pretty heavily:

Proposal: We need to stop using this dark pattern of:
void doFoo() {
if (inscrutableGlobalState) {
// Failed successfully.
return;
}
}In this case, I'd recommend that:
// If RBE config files aren't in the tree, then disable RBE.
final String rbeConfigPath = p.join(
environment.engine.srcDir.path,
'flutter',
'build',
'rbe',
);
argParser.addFlag(
rbeFlag,
defaultsTo: io.Directory(rbeConfigPath).existsSync(),
help: 'RBE is enabled by default when available',
);Now, I can do:
et build --helpAnd see if RBE would defaulted to true, and if I run:
et build --rbe... and RBE can't be used/found, it should result in exit code 1/failure.
Metadata
Metadata
Assignees
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.e: engine-toolEngine-specific tooling (i.e. `tools/engine_tool`).Engine-specific tooling (i.e. `tools/engine_tool`).engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team