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-14212] Removing package from Package.swift doesn't result in import error #4450

Open
typesanitizer opened this issue Feb 14, 2021 · 2 comments
Labels

Comments

@typesanitizer
Copy link

Previous ID SR-14212
Radar rdar://problem/74318312
Original Reporter @typesanitizer
Type Bug
Environment

Xcode 12.4

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

md5: f082009779b0056744aee88b06e7b9e9

relates to:

  • SR-1393 [SwiftPM] Enforce Swift module import dependencies

Issue Description:

Reproduction steps:

  1. Create a new SwiftPM package.

  2. Add (say) ArgumentParser as a dependency https://github.com/apple/swift-argument-parser

  3. Add import ArgumentParser to one of the source code files. Things should compile okay with swift build.

  4. Remove the ArgumentParser dependency from Package.swift

  5. Run swift build again.

Expected behavior: Second run of swift build should fail because ArgumentParser is no longer a dependency, so the module should fail to import.

Actual behavior: Second run of swift build succeeds, but trying swift build -c release fails with the expected error.

@typesanitizer
Copy link
Author

@swift-ci create

@swift-ci
Copy link
Contributor

Comment by Owen Voorhees (JIRA)

I'm marking this as related to SR-1393, which has the same root cause (all the deps are in the same build directory, so the compiler's search path includes more than it should).

@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
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

3 participants