Skip to content

Swift Concurrency Part 4 - Weaver --mainactor (command line option) #183

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
Sep 27, 2024

Conversation

rjchrhl
Copy link
Contributor

@rjchrhl rjchrhl commented Sep 26, 2024

Weaver: add a --mainactor command line option for Swift Concurrency

JIRA: https://scribdjira.atlassian.net/browse/IPT-9571

  • bump weaver version up to 1.1.6 (from previous 1.1.5)

  • by default, weaver 1.1.6 generates the exact same dependency output as 1.1.5

  • however, if the --mainactor command line option is included (as part of the Weaver Build Phases in various Xcode targets), it will now output extra "@ MainActor" annotations, as well as a bit of extra code tweaks, to satisfy Swift Concurrency checks

  • Note: tweak Makefile (as generate-xcodeproj is no longer supported)

Tested weaver 1.1.6 on both current iScribd codebase WITHOUT --mainactor as well as the Swift Concurrency branch WITH --mainactor (where @ MainActor and modified code is correctly generated)

Fully compiled iOS apps and successfully ran them on my iPhone and iPad.

Note: Swift Concurrency Branch is "rjc-swiftconcurrency-checkpoint"


Extra note: "rake weaver" may be needed to get latest version of weaver (after a new release is made)

JIRA:  https://scribdjira.atlassian.net/browse/IPT-9571

- bump weaver version up to 1.1.6 (from previous 1.1.5)

- by default, weaver 1.1.6 generates the exact same dependency output as 1.1.5;
  however, if the --mainactor command line option is included, it will now
  output extra @mainactor annotations, as well as a bit of extra code tweaks,
  to satisfy Swift Concurrency checks

- Note: tweak Makefile (as generate-xcodeproj is no longer supported)

Tested weaver 1.1.6 on both current iScribd codebase WITHOUT --mainactor
as well as the Swift Concurrency branch WITH --mainactor (where @mainactor
and tweaked code is correctly generated)

Note: Swift Concurrency Branch:  "rjc-swiftconcurrency-checkpoint"

---

Extra note: "rake weaver" make be needed to get latest version of weaver
@rjchrhl rjchrhl self-assigned this Sep 26, 2024
@rjchrhl rjchrhl changed the title Weaver: add a --mainactor command line option for Swift Concurrency Swift Concurrency Part 4 - Weaver --mainactor (command line option) Sep 26, 2024
@rjchrhl rjchrhl requested a review from a team September 26, 2024 20:49
@skz skz self-requested a review September 27, 2024 09:24
@skz
Copy link

skz commented Sep 27, 2024

I confirm, that the code of a Weaver builds successfully and Everand application builds and runs successfully, when built with Weaver 1.1.6! Job well done Sir!

Copy link

@skz skz left a comment

Choose a reason for hiding this comment

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

👍

@rjchrhl rjchrhl merged commit 70d6eab into scribd:master Sep 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants