Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Jul 16, 2019

Description

Updates to flutter assemble

  • Change target class to one meant to be extended. Cleans up the API
  • update build method to take a List of input files instead of a map. I'm still iterating on this API, I don't think the change type was actually useful.
  • Remove unused assemble APIs. These didn't end up being useful for iOS or macOS so I'll take them out for now.
  • fix interpolation bug with FLUTTER_ROOT and add test
  • update all targets to take the file with the rule as an input
  • Update computeChanges to not track Update/Modify/Deleted since these are no currently used by any APIs

Changes to testing

  • split build_system_test.dart
  • remove extra groups to reduce nesting.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 16, 2019
@codecov
Copy link

codecov bot commented Jul 16, 2019

Codecov Report

Merging #36240 into master will decrease coverage by 0.54%.
The diff coverage is 85.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #36240      +/-   ##
==========================================
- Coverage    54.8%   54.25%   -0.55%     
==========================================
  Files         187      187              
  Lines       17246    17208      -38     
==========================================
- Hits         9451     9337     -114     
- Misses       7795     7871      +76
Flag Coverage Δ
#flutter_tool 54.25% <85.87%> (-0.55%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/context_runner.dart 70% <0%> (ø) ⬆️
...er_tools/lib/src/build_system/targets/windows.dart 100% <100%> (ø) ⬆️
...utter_tools/lib/src/build_system/build_system.dart 86.44% <100%> (-9.66%) ⬇️
...tter_tools/lib/src/build_system/targets/linux.dart 100% <100%> (ø) ⬆️
...ges/flutter_tools/lib/src/build_system/source.dart 88.57% <100%> (+2.85%) ⬆️
...ter_tools/lib/src/build_system/targets/assets.dart 100% <100%> (ø) ⬆️
...lutter_tools/lib/src/build_system/targets/ios.dart 71.73% <71.73%> (-28.27%) ⬇️
...tter_tools/lib/src/build_system/targets/macos.dart 80% <80%> (+3.52%) ⬆️
...utter_tools/lib/src/build_system/targets/dart.dart 86.79% <85.36%> (+2.17%) ⬆️
...kages/flutter_tools/lib/src/commands/assemble.dart 68.42% <87.5%> (+2.59%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35b07a1...67e80d2. Read the comment docs.

@jonahwilliams jonahwilliams marked this pull request as ready for review July 16, 2019 16:52
@codecov-io
Copy link

codecov-io commented Jul 18, 2019

Codecov Report

Merging #36240 into master will decrease coverage by 1.24%.
The diff coverage is 89.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #36240      +/-   ##
==========================================
- Coverage   55.91%   54.67%   -1.25%     
==========================================
  Files         190      190              
  Lines       17590    17545      -45     
==========================================
- Hits         9836     9592     -244     
- Misses       7754     7953     +199
Flag Coverage Δ
#flutter_tool 54.67% <89.01%> (-1.25%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/context_runner.dart 66.66% <0%> (-1.97%) ⬇️
...er_tools/lib/src/build_system/targets/windows.dart 100% <100%> (ø) ⬆️
...utter_tools/lib/src/build_system/build_system.dart 95.03% <100%> (-1.07%) ⬇️
...tter_tools/lib/src/build_system/targets/linux.dart 100% <100%> (ø) ⬆️
...ges/flutter_tools/lib/src/build_system/source.dart 88.57% <100%> (+2.85%) ⬆️
...ter_tools/lib/src/build_system/targets/assets.dart 100% <100%> (ø) ⬆️
...tter_tools/lib/src/build_system/targets/macos.dart 80% <80%> (+3.52%) ⬆️
...lutter_tools/lib/src/build_system/targets/ios.dart 82.97% <82.97%> (-17.03%) ⬇️
...utter_tools/lib/src/build_system/targets/dart.dart 86.79% <85.36%> (-4.35%) ⬇️
...kages/flutter_tools/lib/src/commands/assemble.dart 69.23% <85.71%> (+3.44%) ⬆️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b57006...8da0cb6. Read the comment docs.

@jonahwilliams
Copy link
Contributor Author

cc @zanderso, did you want to sit down and discuss this PR a bit sometime this week?

results.add(file);
}
return results;
}
Copy link
Member

Choose a reason for hiding this comment

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

In AssetBehavior.outputs the for loop doesn't touch entry.value, so I guess it could instead loop over assetBundle.entries.values instead. I notice that that's what inputs is doing, but inputs is also filtering on the type of the value. If outputs doesn't need to do that as well, then a comment there would be good.

class AssembleCommand extends FlutterCommand {
AssembleCommand() {
addSubcommand(AssembleRun());
addSubcommand(AssembleDescribe());
Copy link
Member

Choose a reason for hiding this comment

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

Were the describe, etc. subcommands not useful? Have you considered exposing them under flags to assemble for e.g. dependency debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the iOS case, I need to generate/reference a file for the xcodeproj to read so having this as a command doesn't help. Gradle might be able to use the commands, but probably not as JSON - something like flutter assemble --list-outputs foo which lists the outputfiles on stdout

@jonahwilliams jonahwilliams merged commit 188093c into flutter:master Jul 25, 2019
@jonahwilliams jonahwilliams deleted the rejigger_api branch July 25, 2019 15:50
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 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.

5 participants