Skip to content

Commit

Permalink
tool/web: correctly log all options to web wasm compile (#126379)
Browse files Browse the repository at this point in the history
Filtering on 'true' omitted non-bool values
  • Loading branch information
kevmoo authored May 10, 2023
1 parent 01ac99a commit 1b831a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
6 changes: 1 addition & 5 deletions packages/flutter_tools/lib/src/web/compiler_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,7 @@ class WasmCompilerConfig extends WebCompilerConfig {
@override
Map<String, Object> get buildEventAnalyticsValues => <String, Object>{
...super.buildEventAnalyticsValues,
for (MapEntry<String, String> entry in toBuildSystemEnvironment()
.entries
.where(
(MapEntry<String, String> element) => element.value == 'true'))
entry.key: entry.value,
...toBuildSystemEnvironment(),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,28 @@ void main() {
expect(logger.statusText, contains('Compiling target for the Web...'));
expect(logger.errorText, isEmpty);
// Runs ScrubGeneratedPluginRegistrant migrator.
expect(logger.traceText, contains('generated_plugin_registrant.dart not found. Skipping.'));
expect(
logger.traceText,
contains('generated_plugin_registrant.dart not found. Skipping.'),
);

// Sends build config event
expect(testUsage.events, unorderedEquals(<TestUsageEvent>[
expect(
testUsage.events,
unorderedEquals(
<TestUsageEvent>[
const TestUsageEvent(
'build',
'web',
label: 'web-compile',
parameters: CustomDimensions(buildEventSettings: 'wasm-compile: true; web-renderer: auto;')
parameters: CustomDimensions(
buildEventSettings:
'RunWasmOpt: none; WasmOmitTypeChecks: false; wasm-compile: true; web-renderer: auto;',
),
),
],
),
]));
);

// Sends timing event.
final TestTimingEvent timingEvent = testUsage.timings.single;
Expand Down

0 comments on commit 1b831a2

Please sign in to comment.