Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop and report an error if xcodebuild fails #646

Merged
merged 1 commit into from
Mar 1, 2020

Conversation

johnfairh
Copy link
Collaborator

Fixes #643. (and probably the inexplicable stuff in realm/jazzy#1087)

This has happened since SourceKitten started running xcodebuild multiple times with the 'new' build system. If the initial build fails then SourceKitten doesn't notice and can proceed to generate docs from the build manifest that the failing xcodebuild invocation has just created.

There are two things that can happen next:

  1. Empty docs are generated. This means xcodebuild has created the build manifest but not populated the Swift response file. Well proven in Empty docs in Xcode 11 (despite latest sourcekitten) #643.
  2. Partially complete docs are generated. This time the response file is there, but there is probably a compilation error in one of the files meaning the SourceKit cursorinfo will silently fail in some places. I don't think this is a feature?

I can add a test -- I think would mean adding a failing Xcode project into fixtures.

Copy link
Owner

@jpsim jpsim left a comment

Choose a reason for hiding this comment

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

It’ll be awkward to test this.

Thanks for the fix and the investigation!

@jpsim jpsim merged commit f7ee209 into jpsim:master Mar 1, 2020
@jpsim jpsim deleted the xcodebuild-errors branch March 1, 2020 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty docs in Xcode 11 (despite latest sourcekitten)
2 participants