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

Fix SPM compilation #82

Closed
wants to merge 10 commits into from
Closed

Fix SPM compilation #82

wants to merge 10 commits into from

Conversation

vmanot
Copy link
Contributor

@vmanot vmanot commented Dec 1, 2020

Fixes #82, building upon #26.

You would not believe the number of hacks I went through to get this to work.

Implementation

  • Create a new module ProtonCore - to be consumed by Proton (still a single package though)
  • Move Objective-C files to ProtonCore
  • Add interfaces to the the ObjC files to allow it to work with with Proton's ObjC declarations.
  • Modify Proton to cast wherever appropriate.

# Conflicts:
#	Proton/Sources/ProtonCore/ListParser.swift
@rajdeep
Copy link
Owner

rajdeep commented Jan 5, 2021

@vmanot, it seems that the files have not been correctly referenced in the Project. The build is failing for the same reason: https://github.com/rajdeep/proton/pull/82/checks

This is what I see on local machine:
project-ref

@YoX89
Copy link
Contributor

YoX89 commented Feb 23, 2021

I see the same as @rajdeep. I tried to manually fix the reference issues but it wasn't enough it seems. Importing this branch as a Swift Package works but building it locally doesn't.

The reason is that the local project needs to have the ProtonCore framework as well. Otherwise the import ProtonCore statements won't compile, which makes sense because ProtonCore only exists in SPM. So I think the solution is to first fix the references and then create a ProtonCore framework that mirrors the SPM ProtonCore target.

@rajdeep
Copy link
Owner

rajdeep commented Mar 23, 2021

Superseded by #110. Thanks for your efforts and input, @vmanot

@rajdeep rajdeep closed this Mar 23, 2021
@rajdeep
Copy link
Owner

rajdeep commented Mar 23, 2021

@YoX89 the changes were beyond just fixing the references as over time there was cyclic dependency created between ObjC and Swift code. Since ObjC code now needed it's own module, I had to change bits to break the dependency of ObjC code on Swift. You should be able to try the latest branch for spm-support with SPM.

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.

3 participants