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

Compilation Error with Package Access Level Modifiers in Swift Packages during Universal Build #7405

Closed
1 task done
CrazyFanFan opened this issue Mar 19, 2024 · 2 comments
Labels

Comments

@CrazyFanFan
Copy link

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

  • Confirmed reproduction steps with SwiftPM CLI.

Description

A compilation error occurs when package access level modifiers are used in a dependent Swift Package while simultaneously building arm64 and x86_64 architectures.

Specifically, swift build, swift build --arch arm64, and swift build --arch x86_64 commands successfully compile individually without any errors. However, the command swift build --arch arm64 --arch x86_64 gives an error.
Consider the error message:

XXXX has a package access level but no -package-name was specified:

Expected behavior

Build succeeded and generated a universal binary

Actual behavior

Build cancelled

Steps to reproduce

  1. Download Foo.zip, then unzip it and change your current directory (cd) into the Foo directory.
  2. Run the command swift build --arch arm64 --arch x86_64.

Swift Package Manager version/commit hash

5.10

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

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Darwin Foo 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:54 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6030 arm64

@MaxDesiatov
Copy link
Member

MaxDesiatov commented Mar 19, 2024

This was fixed in #7258. @CrazyFanFan would you be able to verify that this is no longer reproducible for you with latest development snapshots (swift-DEVELOPMENT-SNAPSHOT-2024-02-29-a or later)? Feel free to reopen this issue otherwise.

@CrazyFanFan
Copy link
Author

CrazyFanFan commented Mar 19, 2024

@MaxDesiatov Thank you for the update. I successfully built the code using the latest development snapshot (swift-DEVELOPMENT-SNAPSHOT-2024-03-13-a).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants