Skip to content

[Stdlib] Rename AnyKeyPath's ObjC name and _VaListBuilder to avoid conflicts with older stdlibs. #21127

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 4 commits into from
Dec 10, 2018

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Dec 7, 2018

rdar://problem/46546165

@mikeash
Copy link
Contributor Author

mikeash commented Dec 7, 2018

@swift-ci please test

@@ -423,9 +423,12 @@ extension Float80 : CVarArg, _CVarArgAligned {

/// An object that can manage the lifetime of storage backing a
/// `CVaListPointer`.
// NOTE: older runtimes called this __VaListBuilder. The two must
Copy link
Contributor

Choose a reason for hiding this comment

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

You've put an extra underscore in the comment…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Argh.

@@ -604,3 +604,5 @@ Var String.Index._utf16Index has been removed (deprecated)

Func MutableCollection.withContiguousMutableStorageIfAvailable(_:) has been added as a protocol requirement
Func Sequence.withContiguousStorageIfAvailable(_:) has been added as a protocol requirement

Class AnyKeyPath is now with @objc
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wait, this is a problem after all, because we don't want people using it in @objc methods. :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops. Do we have another way to rename the ObjC side without actually making it @objc?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm. We have an implementation of something like that for classes with generic ancestry called ObjCRuntimeNameAttr, but you can't actually write that in source right now. We might need a compiler change here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simple changes are never simple, huh. Thanks for the pointer, I’ll look into that.

Copy link
Contributor Author

@mikeash mikeash Dec 10, 2018

Choose a reason for hiding this comment

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

I just pushed an update to make @_objcRuntimeName a usable attribute and use it for this. Hopefully I didn't embarrass myself too badly with the parser modifications. The result is, I believe, what we want now.

@mikeash mikeash force-pushed the rename-anykeypath-and-valistbuilder branch from 811e3ea to 27bcb65 Compare December 7, 2018 22:24
@swift-ci
Copy link
Contributor

swift-ci commented Dec 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - 811e3eac74a9da6e3c13fea6e59e48c2925b443f

@mikeash mikeash force-pushed the rename-anykeypath-and-valistbuilder branch from 27bcb65 to 7f40c7c Compare December 10, 2018 15:35
@mikeash mikeash force-pushed the rename-anykeypath-and-valistbuilder branch from 7f40c7c to 6b94802 Compare December 10, 2018 15:35
@jrose-apple
Copy link
Contributor

Parser changes look fine to me! It would be nice™ to have an IRGen test that shows this is working, but I guess the testing you're doing on the standard library is confirming that too.

@mikeash
Copy link
Contributor Author

mikeash commented Dec 10, 2018

It is, but a real test seems like a good idea too. Added.

@mikeash
Copy link
Contributor Author

mikeash commented Dec 10, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 811e3eac74a9da6e3c13fea6e59e48c2925b443f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 811e3eac74a9da6e3c13fea6e59e48c2925b443f

@mikeash mikeash merged commit a39ee29 into swiftlang:master Dec 10, 2018
futurejones added a commit to futurejones/swift-arm64 that referenced this pull request Dec 19, 2018
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.

3 participants