Fix AsyncAlgorithms 1.3 availability macro typo - #453
Open
PedroTessaro wants to merge 1 commit into
Open
Conversation
The `#else` branch declared `AsyncAlgorithms_v1_3` with the macro name `AsyncAlgorithms 1.2`, so that branch defined `AsyncAlgorithms 1.2` twice and never defined `AsyncAlgorithms 1.3`. Issue: apple#452
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #452.
The
#elsebranch of the availability macro block declaredAsyncAlgorithms_v1_3with the macro nameAsyncAlgorithms 1.2. So on that path the macroAsyncAlgorithms 1.2gets defined twice andAsyncAlgorithms 1.3never gets defined at all. The#ifbranch above it, andPackage@swift-5.8.swift, both have it right, so this looks like a copy/paste slip.It isn't unused:
AsyncAlgorithms 1.3is referenced inSources/AsyncAlgorithms/FlatMapLatest/(AsyncFlatMapLatestSequence.swift,FlatMapLatestStorage.swift,FlatMapLatestStateMachine.swift).One thing worth a second opinion while you're looking at this. I'm not sure the
#elsebranch is reachable any more.Package.swiftisswift-tools-version: 6.2, and there's a separatePackage@swift-5.8.swiftfor older toolchains, so anything that can read this manifest should also satisfycompiler(>=6.0) && swift(>=6.0)and take the#if. The comment on line 7 about 5.10 and visionOS availability reads like a leftover from when the main manifest was on a lower tools version. If that's right, the whole conditional could go and just keep the visionOS variants. Happy to do that in this PR instead if you'd prefer, I just didn't want to bundle a bigger change into a typo fix.swift buildis clean before and after.