-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Rename -enable-resilience to -enable-library-evolution and make it a driver flag #23280
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
Rename -enable-resilience to -enable-library-evolution and make it a driver flag #23280
Conversation
@swift-ci Please smoke test |
@@ -1,7 +1,7 @@ | |||
// RUN: %empty-directory(%t) | |||
|
|||
// -- build resilient library | |||
// RUN: %target-build-swift -force-single-frontend-invocation -Xfrontend -enable-resilience -module-name ExtraInhabitantResilientTypes -emit-module-path %t/ExtraInhabitantResilientTypes.swiftmodule -parse-as-library -c -o %t/ExtraInhabitantResilientTypes.o %S/Inputs/struct_extra_inhabitants_ExtraInhabitantResilientTypes.swift | |||
// RUN: %target-build-swift -force-single-frontend-invocation -enable-resilience -module-name ExtraInhabitantResilientTypes -emit-module-path %t/ExtraInhabitantResilientTypes.swiftmodule -parse-as-library -c -o %t/ExtraInhabitantResilientTypes.o %S/Inputs/struct_extra_inhabitants_ExtraInhabitantResilientTypes.swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jckarter, why are you passing -force-single-frontend-invocation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, the driver appears to only emit the module, not both the module and .o file. I don't understand why. cc @jrose-apple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the driver doesn't special-case single-file -c
except under -force-single-frontend-invocation
, and therefore expects the location of the output file to be controlled by an output file map (because it wouldn't work for two files). Mind filing a bug? (This is similar to SR-7704 but easier to do something about.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you go: https://bugs.swift.org/browse/SR-10116
I'm good if Ted and Anna are good. |
10c955f
to
090a949
Compare
@swift-ci Please smoke test |
090a949
to
7f24790
Compare
@swift-ci Please smoke test |
I personally still experience cognitive load with "resilient" and a few Swift users told me that they do not understand what the term means and they had to look it up. I'd like to suggest -enable-library-evolution as the name of the driver flag. |
I'll note I did get asked to prefer "Library Evolution" when writing https://swift.org/blog/abi-stability-and-more/. (And I happen to agree.) |
7f24790
to
dc9307a
Compare
@swift-ci Please smoke test |
…driver flag Fixes <rdar://problem/47679085>.
dc9307a
to
1159af5
Compare
@swift-ci Please smoke test |
apple/swift-lldb#1384 |
@@ -174,9 +174,6 @@ def disable_objc_attr_requires_foundation_module : | |||
HelpText<"Disable requiring uses of @objc to require importing the " | |||
"Foundation module">; | |||
|
|||
def enable_resilience : Flag<["-"], "enable-resilience">, | |||
HelpText<"Compile the module to export resilient interfaces for all " | |||
"public declarations by default">; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep this as an alias, at least for a little while, since people are already using it outside this repo.
Fixes rdar://problem/47679085.