Skip to content
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

Add support for Swift Concurrency #472

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

garricn
Copy link

@garricn garricn commented Feb 21, 2024

  • Modify Generator, NeedleFoundation, and all Samples to support Swift Concurrency
  • Set SWIFT_STRICT_CONCURRENCY to Complete to all Samples
  • Remove actor isolated code from non-isolated deinits in Samples
  • Run make install to install new needle executable in bin

Hoping to merge #471 and #473 first.

@tinder-cfuller
Copy link

Hello @rudro! 👋 May you please take time to review and approve this PR? Having these concurrency changes in is crucial for strict concurrency checking and Swift 6 adoption. Thank you!!

@tinder-cfuller
Copy link

@rudro Now that Swift 5.10 is released, this is becoming more and more critical. What can we do to get this reviewed and merged in? Please advise. Thank you!

@garricn garricn force-pushed the support-concurrency branch from 0116cc2 to 31e57f1 Compare April 17, 2024 18:29
@tinder-cfuller
Copy link

@rudro May you please advise next steps on this PR? May it be merged in? Thank you! 🙏

@tinder-cfuller
Copy link

@rudro If you may please reply indicating whether this PR will be accepted, or not, this information will be very helpful for planning Swift Concurrency adoption as it relates to Needle. Please advise. Thank you!

@alanzeino
Copy link
Collaborator

@tinder-cfuller as a temporary step you can point your Podfile or SPM to your forked repo to unblock yourself

I'll chat with Rudro about reviewing this PR, it will need to be carefully looked at and tested — we're not planning on using complete (aka 'strict') concurrency checking internally with needle generated code at this moment.

@tinder-cfuller
Copy link

@tinder-cfuller as a temporary step you can point your Podfile or SPM to your forked repo to unblock yourself

I'll chat with Rudro about reviewing this PR, it will need to be carefully looked at and tested — we're not planning on using complete (aka 'strict') concurrency checking internally with needle generated code at this moment.

Hi @alanzeino 👋

Thank you so much for taking a look into this. Very much appreciated. Adding this support to the Uber repo benefits other projects within the community that should not really be depending on my fork.

The @preconcurrency attributes were added intentionally for compatibility with codebases not using complete (aka 'strict') concurrency checking 👍

Please also take note of the two additional PRs in the PR description above as they are related.

Thank you!

@Foixa
Copy link

Foixa commented Oct 6, 2024

Hello, any news?

@Mistakx
Copy link

Mistakx commented Oct 7, 2024

I would also like to know the state of this PR, since without it projects using Needle can't migrate to Swift 6 and use the new concurrency checks.

@alanzeino
Copy link
Collaborator

I would also like to know the state of this PR, since without it projects using Needle can't migrate to Swift 6 and use the new concurrency checks.

Are you sure? You can mark any module as compiling with swift-version = 5 even when using the Swift 6 compiler. Is there a warning or error you can post as an example?

@tinder-cfuller
Copy link

Are you sure? You can mark any module as compiling with swift-version = 5 even when using the Swift 6 compiler. Is there a warning or error you can post as an example?

These changes are necessary for adopting the Swift 6 language model and strict concurrency checking (running in Swift 5 compatibility mode or without strict checks is not satisfactory).

@Mistakx
Copy link

Mistakx commented Oct 8, 2024

I'm apprehensive that Apple may suddenly start soft enforcing the usage of Swift 6 by locking new APIs behind it, and believe migrating to Swift 6 as soon as possible is recommended.

Like @tinder-cfuller said, these changes are necessary to support Swift 6, and the project won't compile without them. Marking modules to use Swift 5 is not a long term sustainable option since Apple is moving in this new Concurrency API's direction.

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