Skip to content

Commit dbed58c

Browse files
NeedleInAJayStackJay Herron
and
Jay Herron
authored
Fixes functionBuilder warnings (#62)
* Fixes functionBuilder warnings. Requires Swift 5.4 * Removes Swift 5.3 CI testing * Increments Swift version in package.swift * Updates Swift version in readme * Disabled codeclimate testing b/c it uses Swift 5.3 Co-authored-by: Jay Herron <[email protected]>
1 parent 0de5d12 commit dbed58c

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
macos:
14-
name: Build and test on macOS
15-
runs-on: macOS-latest
16-
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set code coverage path
19-
run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV
20-
- name: Test and publish code coverage to Code Climate
21-
uses: paulofaria/codeclimate-action@master
22-
env:
23-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
24-
with:
25-
downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
26-
coverageCommand: swift test --enable-test-discovery --enable-code-coverage
27-
coverageLocations: ${{ env.codecov_path }}:lcov-json
13+
# Disabled until https://github.com/paulofaria/test-reporter is updated to Swift 5.4
14+
# macos:
15+
# name: Build and test on macOS
16+
# runs-on: macOS-latest
17+
# steps:
18+
# - uses: actions/checkout@v2
19+
# - name: Set code coverage path
20+
# run: echo "codecov_path=$(swift test --show-codecov-path)" >> $GITHUB_ENV
21+
# - name: Test and publish code coverage to Code Climate
22+
# uses: paulofaria/codeclimate-action@master
23+
# env:
24+
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
25+
# with:
26+
# downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
27+
# coverageCommand: swift test --enable-test-discovery --enable-code-coverage
28+
# coverageLocations: ${{ env.codecov_path }}:lcov-json
2829

2930
linux:
3031
name: Build and test on ${{ matrix.tag }}-${{ matrix.os }}
@@ -35,7 +36,6 @@ jobs:
3536
- focal
3637
- bionic
3738
tag:
38-
- swift:5.3
3939
- swift:5.4
4040
container:
4141
image: ${{ matrix.tag }}-${{ matrix.os }}

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.2
1+
// swift-tools-version:5.4
22
import PackageDescription
33

44
let package = Package(

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Check the [Star Wars API](Tests/GraphitiTests/StarWarsAPI/StarWarsAPI.swift) for
170170

171171
This project is released under the MIT license. See [LICENSE](LICENSE) for details.
172172

173-
[swift-badge]: https://img.shields.io/badge/Swift-5.2-orange.svg?style=flat
173+
[swift-badge]: https://img.shields.io/badge/Swift-5.4-orange.svg?style=flat
174174
[swift-url]: https://swift.org
175175

176176
[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat

Sources/Graphiti/Argument/ArgumentComponentBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_functionBuilder
1+
@resultBuilder
22
public struct ArgumentComponentBuilder<ArgumentsType : Decodable> {
33
public static func buildExpression(_ component: ArgumentComponent<ArgumentsType>) -> ArgumentComponent<ArgumentsType> {
44
component

Sources/Graphiti/Component/ComponentBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_functionBuilder
1+
@resultBuilder
22
public struct ComponentBuilder<Resolver, Context> {
33
public static func buildExpression(_ component: Component<Resolver, Context>) -> Component<Resolver, Context> {
44
component

Sources/Graphiti/Field/Field/FieldComponentBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_functionBuilder
1+
@resultBuilder
22
public struct FieldComponentBuilder<ObjectType, Context> {
33
public static func buildExpression(_ component: FieldComponent<ObjectType, Context>) -> FieldComponent<ObjectType, Context> {
44
component

Sources/Graphiti/InputField/InputFieldComponentBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_functionBuilder
1+
@resultBuilder
22
public struct InputFieldComponentBuilder<InputObjectType, Context> {
33
public static func buildExpression(_ component: InputFieldComponent<InputObjectType, Context>) -> InputFieldComponent<InputObjectType, Context> {
44
component

Sources/Graphiti/Value/ValueBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@_functionBuilder
1+
@resultBuilder
22
public struct ValueBuilder<EnumType : Encodable & RawRepresentable> where EnumType.RawValue == String {
33
public static func buildExpression(_ value: Value<EnumType>) -> Value<EnumType> {
44
value

0 commit comments

Comments
 (0)