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

Swift Package Manager won't resolve grpc due to unsafe flags #86

Closed
RandomActsOfCode opened this issue May 18, 2022 · 2 comments
Closed
Assignees
Labels
area/spm Swift Package Manager Support

Comments

@RandomActsOfCode
Copy link

RandomActsOfCode commented May 18, 2022

Problem Description

Version 1.44.1-grpc contains unsafeFlags in the Package.swift manifest which prevents clients from using grpc. Unsafe flags can only be used for local packages and not for public packages. From the docs:

As some build flags can be exploited for unsupported or malicious behavior, the use of unsafe flags makes the products containing this target ineligible for use by other packages.

Error Produced

The error produced is:

image

Workaround

Unfortunately, this is a transitive dependency in our project and we are not specifying the version. To workaround this we can pin the version to the tag before this change was introduced:

 dependencies: [
    .package(
      url: "https://github.com/grpc/grpc-ios",
      .exact("1.44.0-grpc")
    ),

This is cumbersome since we don't directly use grpc and will have to remember to take this out when the issue is resolved. A warning is also generated since the pinned package is not directly used:

image

@dennycd
Copy link
Contributor

dennycd commented May 18, 2022

@RandomActsOfCode. this issue should now be resolved. Please reset your local cache and try again (1.44.1-grpc) . thanks

@dennycd dennycd closed this as completed May 18, 2022
@sumanc
Copy link

sumanc commented May 18, 2022

It is working now. But I had to delete the Derived Data and restart the XCode to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spm Swift Package Manager Support
Projects
None yet
Development

No branches or pull requests

3 participants