Skip to content

[Concurrency] Use an availability macro instead of OS versions 9999 #37244

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 2 commits into from
May 5, 2021

Conversation

xymus
Copy link
Contributor

@xymus xymus commented May 4, 2021

The use of an availability macro will make it easier to update those versions to the marketing versions when they are announced. Plus internal branches can redefine only the macro for customized availability.

@xymus xymus requested review from ktoso, mikeash and DougGregor May 4, 2021 14:52
Copy link
Contributor

@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.

Oh my that's lovely! <3

Thanks so much for making that happen :-)

@xymus
Copy link
Contributor Author

xymus commented May 4, 2021

Let's try this with the Concurrency module first. I remain open to suggestions for a better macro name.

@swift-ci Please smoke test

Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

@mikeash
Copy link
Contributor

mikeash commented May 4, 2021

As far as naming goes, maybe SwiftStdlib 5.5 or SwiftRuntime 5.5 would be clearer. But the one you have is fine too and I have no particular attachment to any of them.

xymus added 2 commits May 4, 2021 09:30
The use of an availability macro will make it easier to update those
versions to the marketing versions when they are announced. Plus
internal branches can redefine only the macro for customized
availability.
@xymus xymus force-pushed the concurrency-macro branch from b151f62 to 10d115b Compare May 4, 2021 17:06
@xymus
Copy link
Contributor Author

xymus commented May 4, 2021

Updated with SwiftStdlib 5.5, thanks for the suggestion!

@swift-ci Please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This is very cool! Two questions!:

  • Shouldn't we also do this for the standard library, which uses the same pattern?
  • Lots of tests also use this. Should we also put this into the normal lit config so we can use SwiftStdlib <version number> there, too?

@xymus
Copy link
Contributor Author

xymus commented May 4, 2021

Good points. I plan on adding the same macro for the standard library, however it looks like it has some left-over uses of 9999 for older versions that will need more care to turn on or avoid. I'll add it to the lit config at the same time, I didn't think of that.

@swift-ci Please smoke test macOS

@xymus
Copy link
Contributor Author

xymus commented May 4, 2021

@swift-ci Please smoke test macOS

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.

4 participants