Skip to content

Commit

Permalink
Merge pull request #8 from mentalflux/remove-existing-action-support
Browse files Browse the repository at this point in the history
Removes support for existing Action enums
  • Loading branch information
scogeo authored Jun 28, 2024
2 parents b815408 + 2e0b862 commit fbcde66
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 1,811 deletions.
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

0 comments on commit fbcde66

Please sign in to comment.