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
Add Swift Package Manager support (Fixes #7047) #7052
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
.target( | ||
name: "Protobuf", | ||
dependencies: [], | ||
path: "objectivec/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does path
, exclude
, and sources
all work together? There are sources needed that don't live under that sources
reference. I don't suppose there's any way to use globs to help cut down on what has to be explicitly listed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomasvl unfortunately, no globbing. You can use more explicit sources
, or explicit exclude
. For example: https://github.com/getsentry/sentry-cocoa/pull/352/files
path: "objectivec/", | ||
exclude: ["ProtocolBuffers_OSX.xcodeproj", "ProtocolBuffers_iOS.xcodeproj", "ProtocolBuffers_tvOS.xcodeproj", "DevTools/", "Tests/", ".gitignore", "README.md", "generate_well_known_types.sh"], | ||
sources: ["google/protobuf/"], | ||
publicHeadersPath: "objectivec/"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, how do we test things to be sure things are working? We're also seeing some issue with CocoaPods around case sensitive/case insensitive file systems (#6803) and how it handles the path names. So if we are looking to add SwiftPM support, it would be nice to sure things are working for all setups.
One way you can test is by adding it as a package in a dependent Xcode project. I don’t know what globs are, and there are a lot of files in this repository, but I just wanted to get something started if I could. |
globs are patterns like *.m and some systems allow them to be recursive so you don't have to list paths. They are used in the podspec to make it easier to list what is needed without having to have something like the excludes. As far as getting something started, once it lands, it has to be supported. So we need to be sure it is going to work correctly for all cases, hence seeing what can be done to test it, etc. Otherwise, it might work for some folks but not others, and in some ways that ends up being worse than not having support. |
OK, I would love to see support, but I understand the need to make it work for all test cases. Happy New Year! Maintainers, please add |
Closing because:
If anyone believes it should be reopened, it's always a possibility! |
Creates
Package.swift
to fix #7047