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

[SR-14718] Building PackageDescription on Linux gives warning: module 'Foundation' was not compiled with library evolution support #4416

Closed
benlangmuir opened this issue Jun 3, 2021 · 3 comments
Assignees
Labels

Comments

@benlangmuir
Copy link
Member

Previous ID SR-14718
Radar rdar://problem/78827075
Original Reporter @benlangmuir
Type Bug
Status Resolved
Resolution Done
Environment

Swift Docker tag swift:5.4.1

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee @abertelrud
Priority Medium

md5: c45978a9bcc03cd70fb0898f8c80d7e6

Issue Description:

Building the PackageDescription module from swiftpm's main branch on Linux gives

/home/docker_user/src/lsp/sourcekit-lsp/.build/checkouts/swift-package-manager/Sources/PackageDescription/PackageDescription.swift:19:8: warning: module 'Foundation' was not compiled with library evolution support; using it means binary compatibility for 'PackageDescription' can't be guaranteed
import Foundation
       ^ 

This was seen while building sourcekit-lsp with the following patch to add a dependency on PackageDescription: apple/sourcekit-lsp#405

@abertelrud
Copy link
Contributor

@swift-ci create

@abertelrud
Copy link
Contributor

This is almost certainly due to a recent fix to allow PackageDescription and PackagePlugin to be built from source using SwiftPM itself, so they can be built Universal on Darwin platforms. This required adding `--enable-library-evolution` to the target declaration for PackageDescription and PackagePlugin.

This interacts badly with an unintentional reexporting of Foundation symbols in PackageDescription, which was fixed in #3404 but then had to be reverted in #3476. At least until we can reintroduce that fix, we probably will need to disable library evolution on non-Darwin platforms here.

@abertelrud
Copy link
Contributor

Fixed in 6e7bb87

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
drodriguez added a commit to drodriguez/swift-package-manager that referenced this issue Feb 15, 2023
Reverts 1998284 / apple#3526

Related to SR-14718 (apple#4416).

Since apple#3526 was merged, apple#5874 tried to apply the original idea of using
`@_implementationOnly Foundation` in PackageDescription/Plugin to avoid
leaking `Foundation` into the manifests.
neonichu pushed a commit that referenced this issue Feb 21, 2023
…#6157)

Reverts 1998284 / #3526

Related to SR-14718 (#4416).

Since #3526 was merged, #5874 tried to apply the original idea of using
`@_implementationOnly Foundation` in PackageDescription/Plugin to avoid
leaking `Foundation` into the manifests.
This issue was closed.
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