Skip to content

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

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

slavapestov
Copy link
Contributor

Fixes rdar://problem/47679085.

@slavapestov
Copy link
Contributor Author

@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
Copy link
Contributor Author

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?

Copy link
Contributor

@jckarter jckarter Mar 15, 2019

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

Copy link
Contributor

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.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrose-apple
Copy link
Contributor

I'm good if Ted and Anna are good.

@jrose-apple jrose-apple requested a review from AnnaZaks March 14, 2019 00:02
@slavapestov slavapestov force-pushed the enable-resilience-flag branch from 10c955f to 090a949 Compare March 14, 2019 02:48
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov force-pushed the enable-resilience-flag branch from 090a949 to 7f24790 Compare March 14, 2019 19:40
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@AnnaZaks
Copy link
Contributor

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.

@jrose-apple
Copy link
Contributor

jrose-apple commented Mar 14, 2019

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.)

@slavapestov slavapestov force-pushed the enable-resilience-flag branch from 7f24790 to dc9307a Compare March 15, 2019 02:21
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

…driver flag

Fixes <rdar://problem/47679085>.
@slavapestov slavapestov force-pushed the enable-resilience-flag branch from dc9307a to 1159af5 Compare March 15, 2019 02:24
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

apple/swift-lldb#1384
@swift-ci Please smoke test macOS

@slavapestov slavapestov changed the title Promote -enable-resilience to a driver flag Rename -enable-resilience to -enable-library-evolution and make it a driver flag Mar 15, 2019
@@ -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">;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants