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

feat: Add macros from swift-interception-macros package #1

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

maximkrouk
Copy link
Member

Macros approach is aligned with https://github.com/pointfreeco/swift-dependencies
Now they are a part of this package, but have a separate target

Pros vs shared target:

  • Optional use of macros, core features are available without use of macros (macros increase cold compilation time, so not everyone is down to depend on them)

Pros vs separate macros package:

  • Much easier to maintain
  • Easier to import

Cons vs separate macros package:

  • swift-syntax has to be resolved even if client doesn't use macros (however compilation time is not affected if client opts-out macros)

Notes:

  • _InterceptionMacros target declares macros without exporting Interception target, this might be helpful for higher-order libraries development for example combine-interception may hide Interception APIs to constrain interception to Combine APIs, on the other hand InterceptionMacros target exports Interception for convenience.

@maximkrouk maximkrouk added the enhancement New feature or request label Feb 28, 2024
@maximkrouk maximkrouk self-assigned this Feb 28, 2024
@maximkrouk maximkrouk merged commit 8e6231d into main Feb 28, 2024
2 checks passed
@maximkrouk maximkrouk deleted the 0.3.0-beta branch February 28, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant