-
Notifications
You must be signed in to change notification settings - Fork 67
Fix Sendability warnings #137
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
@swift-server-bot test this please |
@@ -71,6 +71,8 @@ extension Timer { | |||
self.recordSeconds(value) | |||
case .never: | |||
self.record(0) | |||
@unknown default: | |||
self.record(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most CI runs this cases the following error:
/code/Sources/Metrics/Metrics.swift:74:9: error: default will never be executed
@unknown default:
^
[8/13] Compiling Metrics Metrics.swift
/code/Sources/Metrics/Metrics.swift:74:9: error: default will never be executed
@unknown default:
^
Can you investigate please @gjcairo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso Can you give an example of a CI config that causes this? I was about to open a PR to fix this because the enum is not frozen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to run tests again to know since it's been so long that since the logs have been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info here: #137 (comment) @AndrewHoos
kicking off to answer: #137 (comment) @swift-server-bot test this please |
FYI @gjcairo; cc @AndrewHoos - since you mentioned you'd like to fix things here |
@swift-server-bot test this please |
@swift-server-bot add to allowlist |
@swift-server-bot test this please |
ce12948
to
158f5b1
Compare
This PR fixes Sendability warnings present when enabling strict concurrency checking.
Motivation:
We want to make sure
swift-metrics
is free of concurrency bugs, and thus removing Sendability warnings is crucial.Modifications:
switch
es.Result:
swift-metrics
is now warning-free.