Skip to content

Conversation

@ktoso
Copy link
Member

@ktoso ktoso commented Jul 18, 2024

Update to support Swift 6.0 and drop old versions, same as all other server packages by now.

resolves rdar://113848512

Comment on lines 247 to 248
#if swift(>=6.0)
public static func withValue<T>(_ value: ServiceContext?,
Copy link
Member

Choose a reason for hiding this comment

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

Actually after looking at this again this is an API break strictly speaking. We need both API shapes in Swift 6 as well since somebody could reference the method. We can just disfavour the old one

Copy link
Member Author

@ktoso ktoso Jul 18, 2024

Choose a reason for hiding this comment

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

I have mixed feelings about this rule tbh, it's somewhat superficial in practice and I think we broke it a bunch of time in various libs tbh.

I'll see if things work out with not iffing out the overload and disfavoring it, hope it just works

@ktoso
Copy link
Member Author

ktoso commented Jul 18, 2024

@swift-server-bot test this please

@ktoso
Copy link
Member Author

ktoso commented Jul 19, 2024

@swift-server-bot test this please

@ktoso
Copy link
Member Author

ktoso commented Jul 19, 2024

@swift-server-bot test this please

…out our source compat apis using deprecated things
@ktoso
Copy link
Member Author

ktoso commented Jul 19, 2024

@swift-server-bot test this please

@ktoso
Copy link
Member Author

ktoso commented Jul 19, 2024

Ok we're good 5.7+

I did keep the source compat version... had to disable warnings as errors to do so though

@ktoso ktoso merged commit 0c62c5b into apple:main Jul 19, 2024
@ktoso ktoso deleted the wip-6.0-prep branch July 19, 2024 02:13
@ktoso ktoso added this to the 1.1.0 milestone Jul 19, 2024

test:
<<: *common
command: /bin/bash -xcl "swift test -Xswiftc -warnings-as-errors $${FORCE_TEST_DISCOVERY-} $${SANITIZER_ARG-} $${STRICT_CONCURRENCY_ARG-}"
Copy link
Member

Choose a reason for hiding this comment

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

That's not great. Which Swift versions have warnings now? In general we aim to keep this enabled otherwise we will accumulate warnings over time

Copy link
Member Author

@ktoso ktoso Jul 19, 2024

Choose a reason for hiding this comment

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

6 does, literarily warning about the api this pr attempted to remove but we chose to keep it around after all. no workaround since we wanted to keep the "bad api" meh.

Tbh I'm still not convinced about keeping that api around, no one uses method references to this method :p

We could disable only on 6 heh.

Copy link
Member

Choose a reason for hiding this comment

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

Disabling only 6 isn't great either because we will carry that warning forward. We might have to bite the bullet here and just say this is not an API break since we are using the @_ API here which was a problem from the beginning.

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.

3 participants