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-registry publish incorrectly handles packages containing symlinks #8248

Open
1 task done
sphanley opened this issue Jan 25, 2025 · 0 comments · May be fixed by #8250
Open
1 task done

swift package-registry publish incorrectly handles packages containing symlinks #8248

sphanley opened this issue Jan 25, 2025 · 0 comments · May be fixed by #8250
Labels

Comments

@sphanley
Copy link

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

I'm trying to push certain open-source packages to a Swift Package Registry, but am having an unexpected issue when trying to publish the realm-swift library. Within the realm-swift sources, there's a directory containing a large number of symlinks. However, when I run swift package-registry publish realm.realm-swift {version}, the resulting archive is not buildable when unarchived.

Expected behavior

I would expect that after publishing a package such as realm-swift to my registry, I should be able to resolve and build it successfully.

Actual behavior

In reality, it appears that the archiving logic does not preserve symlinks in package sources, but instead overwrites them with copies of the referenced file, which is causing errors such as duplicate interface definition for class and property has a previous declaration when trying to resolve and build the realm-swift package from the registry.

Steps to reproduce

To reproduce this issue, you can clone the realm-swift repository, and use swift package-registry publish to push it to a Swift registry. Unzipping the resulting archive will show that the symlinks are not preserved as would be needed for proper usability of the package.

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.0.2-dev

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx14.0
Darwin [hostname redacted] 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000 arm64

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 a pull request may close this issue.

1 participant