Skip to content

Conversation

@dnadoba
Copy link
Member

@dnadoba dnadoba commented Jun 30, 2023

No description provided.

@dnadoba dnadoba added the 🆕 semver/minor Adds new public API. label Jun 30, 2023
Comment on lines +65 to 72
let banner: SSHServerConfiguration.UserAuthBanner?
if case .server(let config) = role {
banner = config.banner
} else {
banner = nil
}

return .possibleFutureMessage(future.map { Self.transform($0, banner: banner) })
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes a warning with strict concurrency checking enabled

@dnadoba
Copy link
Member Author

dnadoba commented Jun 30, 2023

@swift-server-bot test this please

@Lukasa
Copy link
Contributor

Lukasa commented Jul 3, 2023

@swift-server-bot test this please

@dnadoba
Copy link
Member Author

dnadoba commented Jul 4, 2023

Allocation counters regressions are unrelated to this PR:
#152

@dnadoba
Copy link
Member Author

dnadoba commented Jul 4, 2023

Allocation have regressed because I marked the static function transform(:_) with @Sendable to workaround this issue: swiftlang/swift#61449

However, we can also just form a closure manually and don't annotate transform(_:) with @Sendable which doesn't produce Sendable warnings and doesn't allocate.

This bug appears to be already fixed in the latest swift nightly.

@dnadoba dnadoba merged commit d7279ea into apple:main Jul 4, 2023
@dnadoba dnadoba deleted the dn-sendable branch July 4, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants