Skip to content

Conversation

@stuartmorgan-g
Copy link
Contributor

Description

Avoids unnecessarily breaking projects that have another .xcodeproj in
their macos/ directory, which worked until the addition of the getInfo
call.

Related Issues

Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR.

Tests

I added the following tests: None

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 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.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

Avoids unnecessarily breaking projects that have another .xcodeproj in
their macos/ directory, which worked until the addition of the getInfo
call.
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. While there are exceptions to this rule, if this patch modifies code it is probably not an exception.

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

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 3, 2019
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@jonahwilliams
Copy link
Contributor

You'll need to update the Fake/Mock too

stuartmorgan-g and others added 2 commits September 3, 2019 20:24
Co-Authored-By: Jonah Williams <jonahwilliams@google.com>
@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #39782 into master will decrease coverage by 1.6%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #39782      +/-   ##
==========================================
- Coverage   57.57%   55.97%   -1.61%     
==========================================
  Files         194      194              
  Lines       18726    18729       +3     
==========================================
- Hits        10782    10483     -299     
- Misses       7944     8246     +302
Flag Coverage Δ
#flutter_tool 55.97% <71.42%> (-1.61%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/ios/xcodeproj.dart 87.27% <0%> (-0.54%) ⬇️
...kages/flutter_tools/lib/src/macos/build_macos.dart 92.3% <100%> (+0.41%) ⬆️
packages/flutter_tools/lib/src/ios/simulators.dart 12.23% <0%> (-36.72%) ⬇️
packages/flutter_tools/lib/src/run_hot.dart 39.95% <0%> (-28.95%) ⬇️
...ackages/flutter_tools/lib/src/resident_runner.dart 37.25% <0%> (-17.73%) ⬇️
...ckages/flutter_tools/lib/src/reporting/events.dart 83.92% <0%> (-14.29%) ⬇️
...utter_tools/lib/src/build_system/build_system.dart 84.04% <0%> (-8.52%) ⬇️
packages/flutter_tools/lib/src/asset.dart 81.89% <0%> (-2.06%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 68.62% <0%> (-1.97%) ⬇️
packages/flutter_tools/lib/src/version.dart 90.9% <0%> (-1.92%) ⬇️
... and 8 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 e7f6080...845f8a3. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #39782 into master will decrease coverage by 1.6%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #39782      +/-   ##
==========================================
- Coverage   57.57%   55.97%   -1.61%     
==========================================
  Files         194      194              
  Lines       18726    18729       +3     
==========================================
- Hits        10782    10483     -299     
- Misses       7944     8246     +302
Flag Coverage Δ
#flutter_tool 55.97% <71.42%> (-1.61%) ⬇️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/ios/xcodeproj.dart 87.27% <0%> (-0.54%) ⬇️
...kages/flutter_tools/lib/src/macos/build_macos.dart 92.3% <100%> (+0.41%) ⬆️
packages/flutter_tools/lib/src/ios/simulators.dart 12.23% <0%> (-36.72%) ⬇️
packages/flutter_tools/lib/src/run_hot.dart 39.95% <0%> (-28.95%) ⬇️
...ackages/flutter_tools/lib/src/resident_runner.dart 37.25% <0%> (-17.73%) ⬇️
...ckages/flutter_tools/lib/src/reporting/events.dart 83.92% <0%> (-14.29%) ⬇️
...utter_tools/lib/src/build_system/build_system.dart 84.04% <0%> (-8.52%) ⬇️
packages/flutter_tools/lib/src/asset.dart 81.89% <0%> (-2.06%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 68.62% <0%> (-1.97%) ⬇️
packages/flutter_tools/lib/src/version.dart 90.9% <0%> (-1.92%) ⬇️
... and 8 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 e7f6080...845f8a3. Read the comment docs.

@stuartmorgan-g stuartmorgan-g merged commit 3948e87 into flutter:master Sep 5, 2019
@stuartmorgan-g stuartmorgan-g deleted the multi-project-info-support branch September 5, 2019 17:07
@zanderso
Copy link
Member

I'm seeing many of the following reports from crash logging on master that appear related to this change:

ProcessException: Process exited abnormally: xcodebuild: error: 'Runner.xcodeproj' does not exist.
  | at RunResult.throwException | (process.dart:138 )
  | at _DefaultProcessUtils.run | (process.dart:272 )
  | at <asynchronous gap> | (async )
  | at XcodeProjectInterpreter.getInfo | (xcodeproj.dart:334 )
  | at <asynchronous gap> | (async )
  | at buildMacOS | (build_macos.dart:49 )
  | at <asynchronous gap> | (async )
  | at MacOSDevice.startApp | (macos_device.dart:85 )
  | at <asynchronous gap> | (async )
  | at FlutterDevice.runHot | (resident_runner.dart:378 )
  | at <asynchronous gap> | (async )
  | at HotRunner.run | (run_hot.dart:252 )
  | at <asynchronous gap> | (async )
  | at RunCommand.runCommand | (run.dart:460 )
  | at <asynchronous gap> | (async )
  | at FlutterCommand.verifyThenRunCommand | (flutter_command.dart:490 )
  | at _asyncThenWrapperHelper.<anonymous closure> | (async_patch.dart:71 )
  | at _rootRunUnary | (zone.dart:1132 )
  | at _CustomZone.runUnary | (zone.dart:1029 )
  | at _FutureListener.handleValue | (future_impl.dart:137 )
  | at Future._propagateToListeners.handleValueCallback | (future_impl.dart:678 )
  | at Future._propagateToListeners | (future_impl.dart:707 )
  | at Future._completeWithValue | (future_impl.dart:522 )
  | at _AsyncAwaitCompleter.complete | (async_patch.dart:30 )
  | at _completeOnAsyncReturn | (async_patch.dart:288 )
  | at RunCommand.usageValues | (run.dart )
  | at _asyncThenWrapperHelper.<anonymous closure> | (async_patch.dart:71 )
  | at _rootRunUnary | (zone.dart:1132 )
  | at _CustomZone.runUnary | (zone.dart:1029 )
  | at _FutureListener.handleValue | (future_impl.dart:137 )
  | at Future._propagateToListeners.handleValueCallback | (future_impl.dart:678 )
  | at Future._propagateToListeners | (future_impl.dart:707 )
  | at Future._completeWithValue | (future_impl.dart:522 )
  | at Future._asyncComplete.<anonymous closure> | (future_impl.dart:552 )
  | at _rootRun | (zone.dart:1124 )
  | at _CustomZone.run | (zone.dart:1021 )
  | at _CustomZone.runGuarded | (zone.dart:923 )
  | at _CustomZone.bindCallbackGuarded.<anonymous closure> | (zone.dart:963 )
  | at _microtaskLoop | (schedule_microtask.dart:41 )
  | at _startMicrotaskLoop | (schedule_microtask.dart:50 )
  | at _runPendingImmediateCallback | (isolate_patch.dart:116 )
  | at _RawReceivePortImpl._handleMessage | (isolate_patch.dart:173 )

@stuartmorgan-g
Copy link
Contributor Author

@zanderso Hm, that suggests that there are people with configurations where they have a Runner.xcworkspace, but have renamed Runner.xcodeproj, which I wasn't expecting. I'll do a follow-up to check if Runner.xcodeproj exists before passing it, falling back to the old path.

Alternately we could make it a non-crashing hard error to not have Runner.xcodeproj, since I don't think we really want people renaming the managed project, but it's easy enough to support both for now.

@zanderso
Copy link
Member

Throwing a ToolExit is fine if it is something that the user can be expected to fix.

@stuartmorgan-g
Copy link
Contributor Author

Fix posted. I opted for defense in depth, trying to avoid the error but also handling it if it happens.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 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