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-11918] Reject the combination of -enable-testing and -enable-library-evolution #54337

Closed
beccadax opened this issue Dec 6, 2019 · 4 comments
Closed

Comments

@beccadax
Copy link
Contributor

@beccadax beccadax commented Dec 6, 2019

Previous ID SR-11918
Radar rdar://problem/57712099
Original Reporter @beccadax
Type Improvement
Status Closed
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, Driver, StarterBug
Assignee None
Priority Medium

md5: ab250be10d119aca78692308209cbd17

Issue Description:

We know that testability and library evolution have serious compatibility issues. In particular, @testable import of modules with library evolution can cause the compiler to inline code that was optimized with one resilience expansion into a context that requires a different resilience expansion. Rather than waiting for users to encounter bizarre compiler or even runtime crashes when building tests, we should emit a warning or error when the library itself is compiled with both -enable-testing and -enable-library-evolution.

@beccadax
Copy link
Contributor Author

@beccadax beccadax commented Dec 6, 2019

@swift-ci create

@LucianoPAlmeida
Copy link
Collaborator

@LucianoPAlmeida LucianoPAlmeida commented Dec 22, 2019

Just linking the PR #28923 🙂

@slavapestov
Copy link
Member

@slavapestov slavapestov commented Jan 2, 2020

I think building with -enable-testing -enable-library-evolution is important for debug builds of resilient libraries. Recall that -enable-library-evolution changes language semantics around enums, for instance. It is important to build the library in the same way (and get an ABI compatible result) even if you’re planning on running tests.

If the SIL optimizer is doing the wrong thing ,we should fix it. I have fixed a handful of -enable-testing -enable-library-evolution bugs before and they were annoying, but not difficult to fix. Let’s not just give up here.

@beccadax
Copy link
Contributor Author

@beccadax beccadax commented Mar 13, 2020

Okay.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants