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

Update Package.swift to Address Renamed Dependency #128

Closed
wants to merge 1 commit into from

Conversation

jmfigueroa
Copy link

This pull request updates the Package.swift file to address the renaming of the xctest-dynamic-overlay dependency to swift-issue-reporting.

Specifically:

  • The dependency URL has been updated from https://github.com/pointfreeco/xctest-dynamic-overlay to https://github.com/pointfreeco/swift-issue-reporting.

  • The .product references within the dependencies and targets have been updated accordingly:

    • Updated: .product(name: "IssueReporting", package: "xctest-dynamic-overlay") to .product(name: "IssueReporting", package: "swift-issue-reporting").
    • Updated .product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay") to .product(name: "XCTestDynamicOverlay", package: "swift-issue-reporting").

These changes have allowed me to successfully build my projects when using my forked version.

This commit addresses renaming of dependency `xctest-dynamic-overlay` to `swift-issue-reporting`
@mbrandonw
Copy link
Member

Hi @jmfigueroa, we had to rename things back to xctest-dynamic-overlay in #126 due to problems with how Xcode/SPM handled the renaming of the package. For now it is necessary for you to depend on the pointfreeco/xctest-dynamic-overlay package, but use the IssueReporting library from the package.

You should be able to do this in your packages too. What problem were you having exactly?

@jmfigueroa
Copy link
Author

Hi @mbrandonw, thanks for your response. I appreciate the clarification regarding the dependency on pointfreeco/xctest-dynamic-overlay and the use of the IssueReporting library.

To clarify my issue, while the pointfreeco/xctest-dynamic-overlay repository URL redirects correctly to https://github.com/pointfreeco/swift-issue-reporting in a web browser, Xcode does not seem to resolve the package automatically when I attempt to include it in my projects or packages.

The main problem (and the reason I forked) was because of embedded dependencies on pointfreeco/xctest-dynamic-overlay and Xcode's inability to resolve the changed URL. I probably don't know how to handle that or else it's my local setup.

However, when I try to add the package in Xcode, either directly in an Xcode project or in a Swift package, it fails to resolve. This has become an issue because several pointfreeco packages are required in the supabase-swift project.

Steps Taken:

  1. Attempted to add https://github.com/pointfreeco/xctest-dynamic-overlay:

    • Adding this URL as a dependency directly in Xcode and Swift packages fails to resolve.
  2. Forked the Necessary Repositories:

    • Forked the repositories and updated the URLs to point directly to swift-issue-reporting. This has allowed me to get things working on my end. I call IssueReporting without problems.

Additional Details:

In the supabase-swift project, there are several dependencies on pointfreeco packages, including swift-custom-dump, which itself depends on xctest-dynamic-overlay. Here's a brief overview of the dependency setup in supabase-swift:

  • Original Dependencies:

    dependencies: [
        //
        .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.2"),
        //
        .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.2.2"),
      ],

    (shortened for brevity)

  • Updated Dependencies (in my fork):

    dependencies: [
        //
        .package(url: "https://github.com/jmfigueroa/swift-custom-dump", branch: "main"),
        //
        .package(url: "https://github.com/pointfreeco/swift-issue-reporting", branch: "main"),
      ],

I am using Xcode Version 15.3 (15E204a). Is there a recommended way to ensure Xcode resolves the package correctly without having to manually redirect or fork the repositories? Could this be an issue with my Xcode version or a missing configuration on my part?

Alternatively, should I use a local package override in my package instead? If so, could you provide guidance on the best way to implement this?

Thank you for your help and patience.

@mbrandonw
Copy link
Member

Hi @jmfigueroa, from our experience Xcode follows redirects in GitHub URLs just fine. In fact, Apple is in the process of moving many of their repos from the "apple" organization to the "swiftlang" organization, and that highly depends on redirects working. Would it be possible for you to provide a small project that demonstrates the problem you are having so that we can look into it?

Also, we have 1 more step in our Issue Reporting migration to complete, which is to completely separate xctest-dynamic-overlay and swift-issue-reporting into their own repos (like we recently did with swiftui-navigation and swift-navigation). That may be help with this situation, but also as mentioned above, redirects should be working just fine in Xcode.

@mbrandonw
Copy link
Member

Hi @jmfigueroa, I am going to close this for now because redirects should be working just fine. Can you open a discussion if you are still having troubles?

@mbrandonw mbrandonw closed this Aug 21, 2024
@jmfigueroa
Copy link
Author

@mbrandonw Apologies, I've been doing a lot of testing locally and on several remote machines. If/when I discover what it is with our particular setup, I'll open a discussion as you suggested. Thanks!

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.

2 participants