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
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project

Comments

@beccadax
Copy link
Contributor

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 commented Dec 6, 2019

@swift-ci create

@LucianoPAlmeida
Copy link
Collaborator

Just linking the PR #28923 🙂

@slavapestov
Copy link
Member

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

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
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Projects
None yet
Development

No branches or pull requests

3 participants