Rename @_functionBuilder to @resultBuilder for Swift 5.4+ (#44)
* Rename @_functionBuilder to @resultBuilder for Swift 5.4+ * Pin codecov version
This commit is contained in:
parent
a993671120
commit
fd57037a6d
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
run: llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||||
- name: Upload code coverage report
|
- name: Upload code coverage report
|
||||||
uses: codecov/codecov-action@master
|
uses: codecov/codecov-action@v1.5.2
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
file: coverage.lcov
|
file: coverage.lcov
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: xcrun llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
run: xcrun llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||||
- name: Upload code coverage report
|
- name: Upload code coverage report
|
||||||
uses: codecov/codecov-action@master
|
uses: codecov/codecov-action@v1.5.2
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
file: coverage.lcov
|
file: coverage.lcov
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@
|
||||||
// Created by Christian Treffs on 07.08.20.
|
// Created by Christian Treffs on 07.08.20.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if swift(<5.4)
|
||||||
@_functionBuilder
|
@_functionBuilder
|
||||||
public enum FamilyMemberBuilderPreview<R> where R: FamilyRequirementsManaging { }
|
public enum FamilyMemberBuilder<R> where R: FamilyRequirementsManaging { }
|
||||||
public typealias FamilyMemberBuilder<R> = FamilyMemberBuilderPreview<R> where R: FamilyRequirementsManaging
|
#else
|
||||||
|
@resultBuilder
|
||||||
|
public enum FamilyMemberBuilder<R> where R: FamilyRequirementsManaging { }
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,13 @@
|
||||||
// Created by Christian Treffs on 30.07.20.
|
// Created by Christian Treffs on 30.07.20.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if swift(<5.4)
|
||||||
@_functionBuilder
|
@_functionBuilder
|
||||||
public enum ComponentsBuilderPreview { }
|
public enum ComponentsBuilder { }
|
||||||
public typealias ComponentsBuilder = ComponentsBuilderPreview
|
#else
|
||||||
|
@resultBuilder
|
||||||
|
public enum ComponentsBuilder { }
|
||||||
|
#endif
|
||||||
|
|
||||||
extension ComponentsBuilder {
|
extension ComponentsBuilder {
|
||||||
public static func buildBlock(_ components: Component...) -> [Component] {
|
public static func buildBlock(_ components: Component...) -> [Component] {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue