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-2847] Strings should not be able to be bridged to NSString when Foundation is not imported #45441

Open
phausler opened this issue Oct 4, 2016 · 4 comments
Labels
affects ABI Flag: Affects ABI feature A feature request or implementation runtime The Swift Runtime SDKOverlay standard library Area: Standard library umbrella

Comments

@phausler
Copy link
Member

phausler commented Oct 4, 2016

Previous ID SR-2847
Radar rdar://problem/31418210
Original Reporter @phausler
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels New Feature, AffectsABI, Runtime, SDKOverlay
Assignee None
Priority Medium

md5: 6451cacb0a3ffe168105c8113d92efdc

Issue Description:

See https://ci.swift.org/job/swift-PR-osx/3925/consoleFull#106371907ee1a197b-acac-4b17-83cf-a53b95139a76 for the failure in question when attempting to move parts of the bridge into the Foundation overlay.

Any application that is linking Foundation should get the bridgeable behavior and any application that is not importing Foundation should not be getting bridging behavior. This poses a distinct inconsistency with the requested model of the application as well as it can potentially set up the developer for a possible failure when porting to linux.

This is borderline between a bug and a feature request. It should be categorized appropriately.

Fixing this would be a breaking change for applications that are implicitly requiring this behavior so this has a potential ABI and source compatibility impact.

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2016

This is already the behavior we have at the user level. That crash is about an implementation detail of the standard library.

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2016

i.e. the standard library is calling CF directly with an NSString subclass they made. String isn't involved at all in this part of the code (just how it got there).

@phausler
Copy link
Member Author

phausler commented Oct 5, 2016

Hmm looking for occurrences and it seems like String.lowercased() can call this. So perhaps that is merit to actually put the fast-paths fully in the core stdlib instead of the overlay.

@bob-wilson
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation and removed new feature labels Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects ABI Flag: Affects ABI feature A feature request or implementation runtime The Swift Runtime SDKOverlay standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

4 participants