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

Removes support for existing Action enums #8

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Now that we have our `State` implemented, let's implement the `Action`. This is

Now, let's implement the ability to increment and decrement the count by creating two actions `decrementButtonTapped` and `incrementButtonTapped`. In a normal TCA application you would create an `Action` enum and add the two cases. In Composer, we are instead going to name our enum `ViewAction` instead.

> Note: The name `ViewAction` is chosen by convention. You are free to chose any name and structure your code in any way you like (including nested enums) with Composer.
> Note: The name `ViewAction` is chosen by convention. You are free to chose any name and structure your code in any way you like with Composer.
> Composer does have certain preferred conventions and if you adopt them you will be given some additional benefits such as the automatic addition of `@CasePathable` to action enums,
> but you are not obligated to do so.

Expand Down
8 changes: 0 additions & 8 deletions Sources/TCAComposer/Macros/ComposeMacros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ public macro ComposeActionConfirmationDialogCase(_ name: String = "") =
module: "TCAComposerMacros", type: "ComposeDirectiveMacro"
)

/// Directs ``Composer()`` to generate `CasePath`s on an existing `Action` enum. The macro should only be attached
/// to an empty `AllCasePaths` struct declaration inside of the `Action`
@attached(peer)
public macro ComposeAllCasePaths() =
#externalMacro(
module: "TCAComposerMacros", type: "ComposeDirectiveMacro"
)

/// The plaacement options of
public enum ComposerBodyPosition {

Expand Down
13 changes: 0 additions & 13 deletions Sources/TCAComposer/Macros/InternalMacros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ public macro _ComposerCasePathable() =
module: "TCAComposerMacros", type: "_ComposerCasePathableMacro"
)

@attached(member, names: arbitrary)
@attached(memberAttribute)
public macro _ComposedActionMember<T>(_ name: String, of: T.Type) =
#externalMacro(
module: "TCAComposerMacros", type: "_ComposedActionMemberMacro"
)

@attached(member, names: arbitrary)
public macro _ComposedCasePathMember<T>(enumName: String, caseName: String, of: T.Type) =
#externalMacro(
module: "TCAComposerMacros", type: "_ComposedCasePathMemberMacro"
)

@attached(extension, conformances: ScopePathable)
@attached(member, names: named(allComposedScopePaths))
public macro _ComposerScopePathable() =
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading