apple / swift-distributed-tracing

Instrumentation library for Swift server applications
https://swiftpackageindex.com/apple/swift-distributed-tracing/main/documentation/tracing
Apache License 2.0
222 stars 30 forks source link

Fix use of Swift 6 language mode #150

Closed orobio closed 4 weeks ago

orobio commented 2 months ago

Adds a Package@swift-6.0.swift to make sure the package is compiled for the Swift 6 language mode. This fixes the visibility of the new withSpan functions, gated by #if swift(>=6.0).

Not sure if this is the desired solution, but it currently works for us. Let me know if something else is required and I'll be happy to look into it.

Edit: After digging in some more, I think it would be better to update all #if swift(>=6.0) conditionals to #if compiler(>=6.0). Would that be an acceptable solution?

Lukasa commented 2 months ago

I think we should take your suggestion of updating to use #if compiler, not #if swift.

orobio commented 2 months ago

I think we should take your suggestion of updating to use #if compiler, not #if swift.

It's updated to use #if compiler. I just found a comment on the previous pull request, regarding the deprecation being done unconditionally. I feel we should have both @available... and @_disfavoredOverload inside the #if blocks. If you agree, I can push an update for that as well.

Lukasa commented 2 months ago

Yeah, I'm not wild about the deprecation being present when there is no alternative choice.

orobio commented 2 months ago

Yeah, I'm not wild about the deprecation being present when there is no alternative choice.

I pushed a fix for this as well.

Lukasa commented 2 months ago

@ktoso I think we need a review from you here

ktoso commented 2 months ago

Thanks for the ping! Coming out of sick leave inbox was overwhelmed 😅

ktoso commented 2 months ago

@swift-server-bot test this please

ktoso commented 2 months ago

docc plugin seems borked on 5.7? Seems weird 🤔 Need to investigate what's up

jessezamora commented 1 month ago

Anything new here?

orobio commented 1 month ago

Could this have been a temporary glitch? Should we perhaps run the test again?

ktoso commented 4 weeks ago

@swift-server-bot test this please

ktoso commented 4 weeks ago

Sorry I was traveling and only now catching up here, let's see what's up here

ktoso commented 4 weeks ago

@swift-server-bot test this please

ktoso commented 4 weeks ago

Thank you, I'll cut a 1.1.2 with this