apple / swift-atomics

Low-level atomic operations for Swift
Apache License 2.0
1.06k stars 50 forks source link

Compiling a dependent package using branch: "main" fails due to symlinks #98

Closed rvsrvs closed 12 months ago

rvsrvs commented 12 months ago

Building a package which depends on:

.package(url: "https://github.com/apple/swift-atomics.git", branch: "main")

with Xcode 15 RC1 fails with the message:

the package manifest at '/Package@swift-5.8.swift' cannot be accessed (InternalError(description: "Internal error. Please file a bug at https://github.com/apple/swift-package-manager/issues with this info. symlinks not supported")) in https://github.com/apple/swift-atomics.git

Changing the symlinks for Package@swift-5.7.swift and Package@swift-5.8.swift to be actual files by copying the linked file into place resolves the problem.

Information

Checklist

Steps to Reproduce

create a new package with the depdenency shown above. It will fail with that message

Expected behavior

It should compile successfully

Actual behavior

See above.

lorentey commented 12 months ago

Good catch! We'll probably want to duplicate the file contents then. (Weird that this proved an issue on macOS, of all platforms...)

ktoso commented 12 months ago

Let's do a naive simple fix for now to avoid symlinks.

Perhaps this can be cleaned up a bit so multiple copies would not be necessary? But to unblock development for folks here's a simple patch: https://github.com/apple/swift-atomics/pull/100