Skip to content

Commit 1271304

Browse files
authored
Merge pull request #27 from andooown/lexicon-type-id
Introduce LexiconDefinitionID and robust Union decoding
2 parents b9797d9 + 8729597 commit 1271304

File tree

18 files changed

+450
-157
lines changed

18 files changed

+450
-157
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macos-latest]
15+
os: [ubuntu-latest, macos-13]
1616
swift-version: ["5.9"]
1717
steps:
1818
- uses: swift-actions/setup-swift@v1

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ TOOLS_PACKAGE_PATH := Tools
22
TOOLS_PATH := ${TOOLS_PACKAGE_PATH}/.build/release
33

44

5+
.PHONY: gyb
56
gyb:
67
@Scripts/run-gyb.sh
78

Package.resolved

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
"version" : "0.13.0"
2828
}
2929
},
30+
{
31+
"identity" : "swift-syntax",
32+
"kind" : "remoteSourceControl",
33+
"location" : "https://github.com/apple/swift-syntax.git",
34+
"state" : {
35+
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
36+
"version" : "509.0.0"
37+
}
38+
},
3039
{
3140
"identity" : "xctest-dynamic-overlay",
3241
"kind" : "remoteSourceControl",

Package.swift

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// swift-tools-version: 5.9
22

3+
import CompilerPluginSupport
34
import PackageDescription
45

56
let package = Package(
@@ -25,10 +26,15 @@ let package = Package(
2526
name: "ATProtoCore",
2627
targets: ["ATProtoCore"]
2728
),
29+
.library(
30+
name: "ATProtoMacro",
31+
targets: ["ATProtoMacro"]
32+
),
2833
],
2934
dependencies: [
3035
.package(url: "https://github.com/pointfreeco/swift-parsing.git", from: "0.13.0"),
3136
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.0"),
37+
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
3238
],
3339
targets: [
3440
.target(
@@ -44,6 +50,7 @@ let package = Package(
4450
dependencies: [
4551
"ATProtoXRPC",
4652
"ATProtoCore",
53+
"ATProtoMacro",
4754
]
4855
),
4956
.target(
@@ -59,7 +66,8 @@ let package = Package(
5966
.testTarget(
6067
name: "ATProtoXRPCTests",
6168
dependencies: [
62-
"ATProtoXRPC"
69+
"ATProtoXRPC",
70+
"ATProtoMacro",
6371
]
6472
),
6573
.target(
@@ -74,5 +82,26 @@ let package = Package(
7482
"ATProtoCore"
7583
]
7684
),
85+
.target(
86+
name: "ATProtoMacro",
87+
dependencies: [
88+
"ATProtoMacroPlugin"
89+
]
90+
),
91+
.macro(
92+
name: "ATProtoMacroPlugin",
93+
dependencies: [
94+
"ATProtoCore",
95+
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
96+
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
97+
]
98+
),
99+
.testTarget(
100+
name: "ATProtoMacroPluginTests",
101+
dependencies: [
102+
"ATProtoMacroPlugin",
103+
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
104+
]
105+
),
77106
]
78107
)

0 commit comments

Comments
 (0)