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

Static/dynamic library products #168

Merged
merged 5 commits into from
Feb 10, 2023
Merged

Static/dynamic library products #168

merged 5 commits into from
Feb 10, 2023

Conversation

krzyzanowskim
Copy link
Contributor

Resolves #159

This workaround Xcode Cloud builds (due to longstanding Xcode Cloud bug that can't build and link dynamic dependency properly)

@krzyzanowskim
Copy link
Contributor Author

who's in power to merge it?

@SplittyDev
Copy link
Collaborator

Is there a way to give the user a choice? Not sure if static linkage should be the default

Package.swift Outdated Show resolved Hide resolved
Co-authored-by: David Roman <2538074+davdroman@users.noreply.github.com>
@davdroman
Copy link
Collaborator

@SplittyDev let me know if this solution looks sensible to you.

@davdroman davdroman changed the title Static library product Explicit static/dynamic library products Feb 3, 2023
@SplittyDev
Copy link
Collaborator

SplittyDev commented Feb 3, 2023

@davdroman LGTM

I checked again, apparently SPM decides whether to link dynamically or statically automatically if linkage is left unspecified, so providing all three options seems to be the best option.

I'm not sure whether the static entry is needed, though. Afaik, static linkage is the default in Swift, so adding an entry for dynamic linkage should be enough to provide both. Providing both Introspect and Introspect-Static shouldn't be necessary, unless I'm missing something. Generally it isn't easy to find good information on that though, so I might be wrong.

@krzyzanowskim
Copy link
Contributor Author

@SplittyDev static is the whole point of this change because automatically it happen to go dynamic and Xcode build fail

Xcode Cloud bug that can't build and link dynamic dependency

@davdroman
Copy link
Collaborator

davdroman commented Feb 3, 2023

Great stuff. I'll merge this as soon as the CircleCI situation is sorted (#179).

@davdroman davdroman added the blocked This issue is blocked by something else. label Feb 3, 2023
@SplittyDev
Copy link
Collaborator

@SplittyDev static is the whole point of this change because automatically it happen to go dynamic and Xcode build fail

Xcode Cloud bug that can't build and link dynamic dependency

You're absolutely right, I got this wrong at first. Great change, thanks for the PR!

@davdroman davdroman mentioned this pull request Feb 8, 2023
@davdroman davdroman changed the title Explicit static/dynamic library products Static/dynamic library products Feb 8, 2023
@davdroman davdroman removed the blocked This issue is blocked by something else. label Feb 10, 2023
@joelpoloney
Copy link
Contributor

This is no longer blocked by CircleCI FYI.

@davdroman davdroman merged commit e4d9b8d into siteline:master Feb 10, 2023
@davdroman
Copy link
Collaborator

Hi @krzyzanowskim. 0.2.0 is now out and includes this change. Please let us know at some point whether this fixed your Xcode Cloud issues. Thanks!

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.

How to link this as the static framework(or library) with SPM?
5 participants