Skip to content

Conversation

@1amageek
Copy link

@1amageek 1amageek commented Sep 24, 2020

Description

Resolved a problem with Cocoapods when running the flutter build ios-framework .
Thanks to @robrichardson13 for already suggesting a solution to the problem.

#63508

Related Issues

#63508

Tests

I added the following tests:

Replace this with a list of the tests that you added as part of this PR. A change in behavior with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.

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 read the Tree Hygiene wiki page, which explains my responsibilities.
  • 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.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 24, 2020
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
This needs tests, though unfortunately this file is not well unit tested. Can you update the integration test?

'\ndependencies:\n device_info: 0.4.1\n package_info: 0.4.0+9\n',

Try adding native_mixpanel: 0.1.2 (exact version please so changes in this plugin don't break the test)

Near

checkDirectoryExists(path.join(
cocoapodsOutputPath,
mode,
'package_info.framework',
));
do something like:

checkDirectoryExists(path.join(
  cocoapodsOutputPath,
  mode,
  'Mixpanel.framework',
));

and near

for (final String mode in <String>['Debug', 'Profile', 'Release']) {
add the Mixpanel.framework checks (would duplicate less code to add a second loop over ['device_info', 'Mixpanel']).

You can run the test locally:

$ cd dev/devicelab 
$ dart bin/run.dart -t build_ios_framework_module_test

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 24, 2020
@1amageek
Copy link
Author

@jmagman Thank you for providing the details of the test. I've tested it locally and it didn't run well.

stdout: ! Doctor found issues in 1 category.
"/Users/1amageek/Developer/flutter/bin/flutter" exit code: 0
Could not determine JAVA_HOME; not shutting down Gradle.
Unhandled exception:
JSON-RPC error -32000: Server error
package:json_rpc_2/src/client.dart 123:62              Client.sendRequest
package:json_rpc_2/src/peer.dart 98:15                 Peer.sendRequest
package:vm_service_client/src/scope.dart 64:23         Scope.sendRequestRaw
package:vm_service_client/src/isolate.dart 361:19      VMIsolateRef.invokeExtension
package:flutter_devicelab/framework/runner.dart 82:59  runTask
===== asynchronous gap ===========================
bin/run.dart 92:47                                     _runTasks
bin/run.dart 85:11                                     main
dart:isolate-patch/isolate_patch.dart 299:32           _startIsolate.<fn>
dart:isolate-patch/isolate_patch.dart 168:12           _RawReceivePortImpl._handleMessage

@jmagman
Copy link
Member

jmagman commented Sep 25, 2020

@jmagman Thank you for providing the details of the test. I've tested it locally and it didn't run well.

stdout: ! Doctor found issues in 1 category.
"/Users/1amageek/Developer/flutter/bin/flutter" exit code: 0
Could not determine JAVA_HOME; not shutting down Gradle.
Unhandled exception:
JSON-RPC error -32000: Server error
package:json_rpc_2/src/client.dart 123:62              Client.sendRequest
package:json_rpc_2/src/peer.dart 98:15                 Peer.sendRequest
package:vm_service_client/src/scope.dart 64:23         Scope.sendRequestRaw
package:vm_service_client/src/isolate.dart 361:19      VMIsolateRef.invokeExtension
package:flutter_devicelab/framework/runner.dart 82:59  runTask
===== asynchronous gap ===========================
bin/run.dart 92:47                                     _runTasks
bin/run.dart 85:11                                     main
dart:isolate-patch/isolate_patch.dart 299:32           _startIsolate.<fn>
dart:isolate-patch/isolate_patch.dart 168:12           _RawReceivePortImpl._handleMessage

I think I just fixed that yesterday! Try rebasing on master ToT and try again, or temporarily comment everything in that cleanupSystem method to get it to run locally (don't check in the commented code!).

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jmagman
Copy link
Member

jmagman commented Nov 5, 2020

@1amageek I took a crack at this in #69736 (comment). Would you be able to test it for me? It's available on the master channel.

@jmagman jmagman closed this Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants