Skip to content

Fix use of Swift 6 language mode #150

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

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

orobio
Copy link
Contributor

@orobio orobio commented Aug 21, 2024

Adds a [email protected] 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
Copy link

Lukasa commented Aug 21, 2024

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

@orobio orobio force-pushed the fix-use-of-swift-6-language-mode branch from f327dc8 to 0ee1e63 Compare August 21, 2024 14:50
@orobio
Copy link
Contributor Author

orobio commented Aug 21, 2024

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
Copy link

Lukasa commented Aug 21, 2024

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

@orobio
Copy link
Contributor Author

orobio commented Aug 22, 2024

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
Copy link

Lukasa commented Aug 23, 2024

@ktoso I think we need a review from you here

Copy link
Collaborator

@slashmo slashmo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

These look good, thank you very much!

Definitely agreed on #if guarding the deprecations as well, thank you for doing that

@ktoso
Copy link
Member

ktoso commented Aug 23, 2024

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

@ktoso
Copy link
Member

ktoso commented Aug 23, 2024

@swift-server-bot test this please

@ktoso
Copy link
Member

ktoso commented Aug 23, 2024

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

@jessezamora
Copy link

Anything new here?

@orobio
Copy link
Contributor Author

orobio commented Sep 24, 2024

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

@ktoso
Copy link
Member

ktoso commented Oct 9, 2024

@swift-server-bot test this please

@ktoso
Copy link
Member

ktoso commented Oct 9, 2024

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

@ktoso
Copy link
Member

ktoso commented Oct 9, 2024

@swift-server-bot test this please

@ktoso ktoso merged commit 6483d34 into apple:main Oct 9, 2024
6 checks passed
@ktoso
Copy link
Member

ktoso commented Oct 9, 2024

Thank you, I'll cut a 1.1.2 with this

@ktoso ktoso added this to the 1.1.2 milestone Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants