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

Add Swift Package Manager support (Fixes #7047) #7052

Closed
wants to merge 1 commit into from
Closed

Add Swift Package Manager support (Fixes #7047) #7052

wants to merge 1 commit into from

Conversation

UInt2048
Copy link

Creates Package.swift to fix #7047

@googlebot
Copy link

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 @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

.target(
name: "Protobuf",
dependencies: [],
path: "objectivec/",
Copy link
Contributor

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?

Copy link

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/"),
Copy link
Contributor

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.

@UInt2048
Copy link
Author

UInt2048 commented Dec 28, 2019

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.

@thomasvl
Copy link
Contributor

One way you can test is by adding it as a package in a dependent Xcode project within Xcode. I don’t know what globs is, 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.

@UInt2048
Copy link
Author

UInt2048 commented Dec 31, 2019

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 release notes: no label

@UInt2048
Copy link
Author

Closing because:

  1. It doesn't seem to be gaining acceptance
  2. https://github.com/apple/swift-protobuf has had SwiftPM support since the beginning

If anyone believes it should be reopened, it's always a possibility!

@UInt2048 UInt2048 closed this Jun 13, 2020
lionello added a commit to lionello/protobuf that referenced this pull request Jan 3, 2023
lionello added a commit to lionello/protobuf that referenced this pull request Jan 3, 2023
lionello added a commit to lionello/protobuf that referenced this pull request Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Swift Package Manager support
4 participants