Skip to content

Add basic codegen app to be used for integration testing and benchmarks - #27257

Merged
jonahwilliams merged 25 commits into
flutter:masterfrom
jonahwilliams:add_integration
Feb 15, 2019
Merged

jonahwilliams merged 25 commits into
flutter:masterfrom
jonahwilliams:add_integration

Conversation

@jonahwilliams

@jonahwilliams jonahwilliams commented Jan 29, 2019 •

Copy link
Copy Markdown
Contributor
  • Adds generate command, which runs code generation without compiling to kernel.
  • Separates code generation APIs based on build_runner usage to keep google3 rolling simple. Only the BuildRunner directory cannot be used (added a forbidden imports tests to catch this).
  • When the experimental flutter build is enabled swap out

Basic flutter app which brews coffee on button press, requires dart inject code generation to run.

Work towards #27141

@jonahwilliams
jonahwilliams requested a review from yjbanov January 29, 2019 21:27
Comment thread dev/integration_tests/codegen/pubspec.yaml
Comment thread dev/integration_tests/codegen/pubspec.yaml
@zoechi zoechi added a: tests "flutter test", flutter_test, or one of our tests tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 30, 2019
@jonahwilliams

Copy link
Copy Markdown
Contributor Author

cc @yjbanov PTAL

Comment thread dev/integration_tests/codegen/lib/coffee_app.dart
Comment thread packages/flutter_tools/lib/src/build_runner/build_runner.dart Outdated
Comment thread packages/flutter_tools/lib/src/build_runner/build_runner.dart Outdated
@yjbanov

yjbanov commented Feb 7, 2019

Copy link
Copy Markdown
Contributor

lgtm

@jonahwilliams jonahwilliams changed the title Add basic codegen app to be used for integration testing and benchmarks [WIP] Add basic codegen app to be used for integration testing and benchmarks Feb 7, 2019
@jonahwilliams jonahwilliams changed the title [WIP] Add basic codegen app to be used for integration testing and benchmarks Add basic codegen app to be used for integration testing and benchmarks Feb 11, 2019
@jonahwilliams

Copy link
Copy Markdown
Contributor Author

Adding @zanderso for tool changes

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

Unless anyone has any comments, I will land this tonight after the build is green

@yjbanov yjbanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I only have some nits. LGTM.

import 'runner.dart' as runner;
import 'src/base/context.dart';
// The build_runner code generation is provided here to make it easier to
// avoid introducing the dependency into google3.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: This aspect might be useful to others companies, so I'd phrase it as "avoid introducing the dependency into build systems that use their own codegen methods, such as Google's internal infrastructure".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is only an issue for google3 because the build packages are not synced. In theory it could run...

verboseHelp: verboseHelp);
verboseHelp: verboseHelp,
overrides: <Type, Generator>{
// The build runner instance is not supported in google3.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same nit here

Comment thread packages/flutter_tools/lib/src/codegen.dart Outdated
Comment thread packages/flutter_tools/lib/src/codegen.dart Outdated
Comment thread packages/flutter_tools/lib/src/codegen.dart

@zanderso zanderso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment thread packages/flutter_tools/lib/src/resident_runner.dart
Comment thread packages/flutter_tools/lib/src/run_hot.dart
@jonahwilliams
jonahwilliams merged commit 67cf215 into flutter:master Feb 15, 2019
@jonahwilliams
jonahwilliams deleted the add_integration branch February 15, 2019 07:33
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants