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

Support for Xcode 11 attributes and objects. #687

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Jun 4, 2019

@jefhai
Copy link

jefhai commented Jun 4, 2019

@dnkoutso is this related #688 ?

@dnkoutso
Copy link
Contributor Author

dnkoutso commented Jun 4, 2019

from SPM

[!] [!] Xcodeproj doesn't know about the following attributes {"productRef"=>"B789131C22A6CEF80033A94E"} for the 'PBXBuildFile' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new

[!] [!] Xcodeproj doesn't know about the following attributes {"productRef"=>"B789131C22A6CEF80033A94E"} for the 'PBXBuildFile' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new

[!] [!] Xcodeproj doesn't know about the following attributes {"packageProductDependencies"=>["B789131C22A6CEF80033A94E"]} for the 'PBXNativeTarget' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new

[!] [!] Xcodeproj doesn't know about the following attributes {"packageReferences"=>["B789131B22A6CEF80033A94E"]} for the 'PBXProject' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new

@jefhai
Copy link

jefhai commented Jun 4, 2019

@dnkoutso is SPM a tool that shows that information? Can you link me to it?

@dnkoutso
Copy link
Contributor Author

dnkoutso commented Jun 4, 2019

SPM = Swift Package Manager.

@dnkoutso
Copy link
Contributor Author

dnkoutso commented Jun 4, 2019

PR still WIP but added all SPM references.

@dnkoutso dnkoutso changed the title Update last known versions for Xcode 11 WIP Support for Xcode 11 new attributes. Jun 4, 2019
@dnkoutso dnkoutso force-pushed the xcode11_support branch 2 times, most recently from 27670f1 to f818c06 Compare June 5, 2019 00:07
@dnkoutso dnkoutso changed the title WIP Support for Xcode 11 new attributes. Support for Xcode 11 attributes and objects. Jun 5, 2019
@dnkoutso
Copy link
Contributor Author

dnkoutso commented Jun 5, 2019

@segiddins ready for review. Uncertain on how to update test fixtures.

Copy link
Member

@segiddins segiddins left a comment

Choose a reason for hiding this comment

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

Should we add a fixture project to make sure we can load these new objects properly?

lib/xcodeproj/project/object.rb Show resolved Hide resolved
@@ -76,9 +80,19 @@ def ascii_plist_annotation
' Project object '
end

def to_hash_as(method = :to_hash)
hash_as = super
if !hash_as['packageReferences'].nil? && hash_as['packageReferences'].empty?
Copy link
Contributor Author

@dnkoutso dnkoutso Jun 10, 2019

Choose a reason for hiding this comment

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

@segiddins these values are "optional" as in a default Xcode 11 project will not include them in its plist unless at least one SPM package is added. Is there a better way in Xcodeproj to handle this?

The way I have it here is passing all tests but felt its a bit ugly. Alternatively, we can update all tests to ensure packageReferences => [] is taken into consideration even though they are none in the actual .pbxproj.

@benasher44
Copy link
Member

benasher44 commented Jun 11, 2019

There's also a new one called inputFiles. Just saw it crop up this morning in our codebase. It's part of PBXBuildRule

if !plist.value['packageProductDependencies'].nil? && plist.value['packageProductDependencies'].empty?
plist.value.delete('packageProductDependencies')
end
plist
Copy link
Member

Choose a reason for hiding this comment

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

is this covered by any tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is already covered by existing tests but I might add an explicit one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added explicit tests.

@dnkoutso
Copy link
Contributor Author

@benasher44 will update.

@dnkoutso
Copy link
Contributor Author

Added missing input_files in PBXBuildRule

@benasher44
Copy link
Member

input_files lg2m

@dnkoutso dnkoutso merged commit b2cd5f5 into CocoaPods:master Jun 11, 2019
@dnkoutso dnkoutso deleted the xcode11_support branch June 11, 2019 23:35
@dnkoutso
Copy link
Contributor Author

Will release 1.10.0

@dnkoutso
Copy link
Contributor Author

Shipped. gem update xcodeproj to get latest version for initial (and maybe final) support for Xcode 11.

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.

Can't get pod update to work on macOS Catalina Xcode 11 Beta Crash
5 participants