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

Remove swift-atomics from v2 #2041

Merged
merged 8 commits into from
Sep 5, 2024
Merged

Remove swift-atomics from v2 #2041

merged 8 commits into from
Sep 5, 2024

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Sep 2, 2024

Motivation:

Swift 6 includes built-in support for atomics in the Synchronization module. Currently we depend on the swift-atomics package which is no longer necessary.

Modifications:

Remove usages of swift-atomics from v2

Result:

Fewer dependencies

Motivation:

Swift 6 includes built-in support for atomics in the Synchronization
module. Currently we depend on the swift-atomics package which is no
longer necessary.

Modifications:

Remove usages of swift-atomics from v2

Result:

Fewer dependencies
@glbrntt glbrntt requested a review from gjcairo September 2, 2024 16:44
@glbrntt glbrntt added the v2 A change for v2 label Sep 2, 2024
@glbrntt glbrntt enabled auto-merge (squash) September 4, 2024 15:48
Comment on lines 18 to 22
import NIOCore
import NIOHTTP2
import NIOPosix
import Synchronization
private import Synchronization
import XCTest
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't enable internal imports by default on test targets and executable targets (and didn't bother adding the modifiers to all imports) because test/executable targets can't be dependencies anyways, so I don't think there's any benefit in using access level modifiers on them. It's a nit, but unless you disagree with this I'd just drop the private. If you think it's worth having access levels across all (v2) targets, then I can enable it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's fair, I did it out of habit. I'm fine not bothering in tests, so I'll remove this and elsewhere.

Tests/GRPCHTTP2CoreTests/Internal/TimerTests.swift Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we've got a few utils copied between test targets - do you think it would make sense to have a test utils target to centralise some of the code? Or not worth it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was wondering the same thing the other day, I want to hold off on making that decision until we figure out the package split situation.

Sources/performance-worker/BenchmarkService.swift Outdated Show resolved Hide resolved
@glbrntt glbrntt requested a review from gjcairo September 5, 2024 12:27
Copy link
Collaborator

@gjcairo gjcairo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks George! Tests particularly look much cleaner now with the AtomicCounter 😌

@glbrntt glbrntt merged commit 0a6b49f into grpc:main Sep 5, 2024
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 A change for v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants