Skip to content

Commit d482c6d

Browse files
authored
Merge pull request #11 from yukiny0811/fix-access
Fix access modifier issue
2 parents 074036b + e4132f4 commit d482c6d

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ env:
99
DEVELOPER_DIR: /Applications/Xcode_15.2.app
1010
jobs:
1111
build:
12-
runs-on: macos-13
12+
runs-on: macos-14
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Build macOS
16-
run: xcodebuild -scheme EasyMetalShader build -destination "generic/platform=macOS"
16+
run: set -o pipefail && xcodebuild -skipMacroValidation -scheme EasyMetalShader build -destination "generic/platform=macOS,arch=arm64,variant=macOS" | xcpretty
1717
- name: Build iOS
18-
run: xcodebuild -scheme EasyMetalShader build -destination "generic/platform=iOS"
18+
run: set -o pipefail && xcodebuild -skipMacroValidation -scheme EasyMetalShader build -destination "generic/platform=iOS" | xcpretty
1919
test:
20-
runs-on: macos-13
20+
runs-on: macos-14
2121
steps:
2222
- uses: actions/checkout@v3
2323
- name: Test macOS
24-
run: xcodebuild -scheme EasyMetalShaderTests test -destination "platform=macOS,arch=x86_64"
24+
run: set -o pipefail && xcodebuild -skipMacroValidation -scheme EasyMetalShaderTests test -destination "platform=macOS,arch=arm64" | xcpretty
2525
- name: Test iOS
26-
run: xcodebuild -scheme EasyMetalShaderTests test -destination "name=iPhone 14 Pro"
26+
run: set -o pipefail && xcodebuild -skipMacroValidation -scheme EasyMetalShaderTests test -destination "platform=iOS" | xcpretty

Sources/EasyMetalShaderMacro/EMComputeShader/EMComputeShader+MemberMacro.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ extension EMComputeShader: MemberMacro {
125125

126126
let thisDecl1: DeclSyntax =
127127
"""
128-
var computePipelineState: MTLComputePipelineState!
128+
public var computePipelineState: MTLComputePipelineState!
129129
"""
130130

131131
let thisDecl2: DeclSyntax =
132132
"""
133-
var args: [String: EMMetalArgument] = [:]
133+
public var args: [String: EMMetalArgument] = [:]
134134
"""
135135

136136
let thisDecl3: DeclSyntax = .init(stringLiteral: ComputeFunctionStrings.initFunc(variableInitStrings: initStringList, gidTypeString: "ushort2"))
@@ -140,7 +140,7 @@ extension EMComputeShader: MemberMacro {
140140
if !hasInitInImplementation {
141141
thisDecl4 =
142142
"""
143-
init() {
143+
public init() {
144144
setup()
145145
}
146146
"""

Sources/EasyMetalShaderMacro/EMComputeShader3D/EMComputeShader3D+MemberMacro.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ extension EMComputeShader3D: MemberMacro {
125125

126126
let thisDecl1: DeclSyntax =
127127
"""
128-
var computePipelineState: MTLComputePipelineState!
128+
public var computePipelineState: MTLComputePipelineState!
129129
"""
130130

131131
let thisDecl2: DeclSyntax =
132132
"""
133-
var args: [String: EMMetalArgument] = [:]
133+
public var args: [String: EMMetalArgument] = [:]
134134
"""
135135

136136
let thisDecl3: DeclSyntax = .init(stringLiteral: ComputeFunctionStrings.initFunc(variableInitStrings: initStringList, gidTypeString: "ushort3"))
@@ -140,7 +140,7 @@ extension EMComputeShader3D: MemberMacro {
140140
if !hasInitInImplementation {
141141
thisDecl4 =
142142
"""
143-
init() {
143+
public init() {
144144
setup()
145145
}
146146
"""

Sources/EasyMetalShaderMacro/EMRenderShader/EMRenderShader+MemberMacro.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ extension EMRenderShader: MemberMacro {
136136

137137
let thisDecl1: DeclSyntax =
138138
"""
139-
var renderPipelineState: MTLRenderPipelineState!
139+
public var renderPipelineState: MTLRenderPipelineState!
140140
"""
141141

142142
let thisDecl2: DeclSyntax =
143143
"""
144-
var args: [String: EMMetalArgument] = [:]
144+
public var args: [String: EMMetalArgument] = [:]
145145
"""
146146

147147
let thisDecl3: DeclSyntax = .init(stringLiteral: RenderFunctionStrings.initFunc(variableInitStrings: initStringList))
@@ -151,7 +151,7 @@ extension EMRenderShader: MemberMacro {
151151
if !hasInitInImplementation {
152152
thisDecl4 =
153153
"""
154-
init(targetPixelFormat: MTLPixelFormat) {
154+
public init(targetPixelFormat: MTLPixelFormat) {
155155
setup(targetPixelFormat: targetPixelFormat)
156156
}
157157
"""

0 commit comments

Comments
 (0)