-
Notifications
You must be signed in to change notification settings - Fork 13
feat: upgrade to swift 6.0 #30
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
base: main
Are you sure you want to change the base?
Conversation
| XCTAssert(ActivityContextManager.instance.getCurrentContextValue(forKey: .span) === span1) | ||
| let expec = expectation(description: "testStartAndEndSpanInAsyncQueue") | ||
| DispatchQueue.global().async { | ||
| let span2 = self.createSpan(parentSpan: span1, name: "testStartAndEndSpanInAsyncQueue2") |
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.
create span and endSpanAndValidateContext not only start and end the span but also validate the active span before and after running, and that is not being done now. We should keep calling them as that validation is very key for the tests, probably the methods need updating to something like:
static nonisolated func createSpan( tracer: DefaultTracer, parentSpan: Span, name: String) static nonisolated func endSpanAndValidateContext(span: Span, parentSpan: Span?)
And be called properly, even wrapping the passing span in a Mutex or using the Locked class from the SDK that allows similar functionality to Mutex
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.
Nice eye, addressed in b37e351
|
Except for that detail with the tests all the rest looks really good, you have done a great work. |
Revision 2Originally, I deleted SemanticAttributes file because it's deprecated. But I realized the migration to SemanticConventions file contains a lot of breaking changes, which should be reviewed separately. Also addressed the issue @nachoBonafonte raised by restoring the ActivityContextManagerTests |
|
please pull main to get the updated workflow |


Revision 1
Swift 6.0 adds some concurrency checks. This was some bitter work but I completed the migration work for core.
Implementation
@unchecked Sendableto pretty much every classTesting
I removed the strict checks on test code to keep code changes minimal. I still need to do some manual end-to-end testing to get some more confidence.
Revision 2
This is standalone PR that is compatible with projects using Swift v5.9
Manually tested against real devices - See #30 (comment)