Skip to content

Commit

Permalink
[Swift 6] Move LosslessRawRepresentable out of UnstableEnum macro…
Browse files Browse the repository at this point in the history
… target (#69)

* Move `LosslessRawRepresentable` out of `UnstableEnum` macro target in prep for Swift 6

* Trigger CI

* try no coverage_ignores
  • Loading branch information
MahdiBM committed May 3, 2024
1 parent ddce0d0 commit 82e81f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
with_tsan: true
with_public_api_check: true
with_gh_codeql: false # Temporary, because it's broken
coverage_ignores: '/Tests/|/Plugins/|/Sources/CZlib/'
test_filter: '^DiscordBMTests'
macro-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
Expand All @@ -23,7 +22,6 @@ jobs:
with_tsan: true
with_public_api_check: true
with_gh_codeql: false # Temporary, because it's broken
coverage_ignores: '/Tests/|/Plugins/|/Sources/CZlib/'
test_filter: '^MacroTests'
websocket-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
Expand All @@ -32,5 +30,4 @@ jobs:
with_tsan: false
with_public_api_check: false
with_gh_codeql: false # Temporary, because it's broken
coverage_ignores: '/Tests/|/Plugins/|/Sources/CZlib/'
test_filter: '^WebSocketTests'
7 changes: 0 additions & 7 deletions Macros/UnstableEnumMacro/LosslessRawRepresentable.swift

This file was deleted.

7 changes: 6 additions & 1 deletion Sources/DiscordModels/UnstableEnumMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ import UnstableEnumMacro
)
macro UnstableEnum() = #externalMacro(module: "UnstableEnumMacro", type: "UnstableEnum")

public typealias LosslessRawRepresentable = UnstableEnumMacro.LosslessRawRepresentable
/// Just a compile-time protocol to make sure `UnstableEnumMacro` types are safe to
/// force-unwrap when using ``RawRepresentable.init(rawValue:)``
///
/// This is assigned to all types with `UnstableEnumMacro` attribute.
@_marker
public protocol LosslessRawRepresentable { }

0 comments on commit 82e81f1

Please sign in to comment.