-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget. #81940
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
Conversation
@swift-ci Please smoke test |
# will expand to the current `-target` platform if the macro defines a | ||
# newer platform as its availability. | ||
# | ||
# There is a setting, SWIFT_STDLIB_ENABLE_STRICT_AVAILABILITY, which if set | ||
# ON will cause us to use the "proper" availability instead. | ||
string(REPLACE "SwiftStdlib" "SwiftStdlibCurrentOS" current "${def}") | ||
string(REPLACE "SwiftStdlib" "DeploymentTarget" current "${def}") |
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 am afraid the new name as is could become a little difficult to search in the code base (as the compiler code already use DeploymentTarget
for a few symbols) -- filters could help (e.g. files under stdlib
, or files ending with *.cmake
), but I personally don't always add those (especially when I'm doing a quick search to assess issues).
string(REPLACE "SwiftStdlib" "DeploymentTarget" current "${def}") | |
string(REPLACE "SwiftStdlib" "SwiftStdlibDeploymentTarget" current "${def}") |
If adding back a prefix is not desirable, I would suggest to document this choice in utils/availability-macros.def
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'm not sure this is such a problem in practice as you could always do a regex search for DeploymentTarget \d+\.\d+
.
What do you think, @stephentyrone? Happy to change the name if we think it's worth doing.
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.
Decided on reflection to change it to StdlibDeploymentTarget
. I don't want to make it too long, but I think @edymtt is right that it's easier if it's a unique string (there are some hits in some of the Python code for StdlibDeploymentTarget
, but I don't think that's particularly troublesome, and adding Swift
as well just makes it really long).
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.
Works for me.
`StdlibDeploymentTarget` seems to be a better name. rdar://152498657
be65e53
to
42ca1b1
Compare
@swift-ci Please smoke test |
StdlibDeploymentTarget
seems to be a better name.rdar://152498657