-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add @discardableResult
to changeCurrentDirectoryPath(_:)
#741
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
To match Darwin's API.
Hm, is the importer applying discardableResult automatically to some set of methods that come from Objective-C? I don't see the annotation in the generated interface, and we don't have anything specifically about this in our API notes. |
I don't know how those internals are set up, but I can say that I wasn't getting a warning in Xcode 8.1 and I started getting warnings on Linux: realm/SwiftLint@31814c3 |
Unless there were later policy changes I'm not aware of, |
So I guess the question I have is this: should we be putting |
And/or start considering where it might make sense to annotate some Darwin Foundation declarations with @jrose-apple any thoughts on how Corelibs should approach this? XCTest doesn't have much API that's affected by this, but we did add |
I'm not sure. For a new library that had both Objective-C and Swift interfaces, of course we'd recommend adding The next step is whether it's okay to diverge, since anyone writing against Swift Foundation ought to be following Swift rules for return values. In that case it'd be a good idea to take changes like this one, where the return value really is unimportant a lot of the time, but not do the mass change. I think the corelibs have made cross-platform compatibility a very high goal, however. |
Divergence is not really an option for us; the goal is cross-platform compatibility. That does not mean that it cannot change, however. We would just need to do it in tandem with a change to the system Foundation. |
Let's do them in reasonably sized chunks, so they are easier to merge and less likely to conflict with other PRs in flight. |
I can't tell from your comment if "reasonably sized chunks" means smaller or larger chunks 😉 Given that you merged #740 but not this one, I'm even more confused.... What would you like me to do with this PR to get it merged? |
Sorry, I can merge this one too. By reasonably sized I meant one subsystem or so at a time. |
@swift-ci test and merge |
To match Darwin's API.