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
|
||||
run: llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
uses: codecov/codecov-action@v1.5.2
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
- 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
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
uses: codecov/codecov-action@v1.5.2
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
// Created by Christian Treffs on 07.08.20.
|
||||
//
|
||||
|
||||
#if swift(<5.4)
|
||||
@_functionBuilder
|
||||
public enum FamilyMemberBuilderPreview<R> where R: FamilyRequirementsManaging { }
|
||||
public typealias FamilyMemberBuilder<R> = FamilyMemberBuilderPreview<R> where R: FamilyRequirementsManaging
|
||||
public enum FamilyMemberBuilder<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.
|
||||
//
|
||||
|
||||
#if swift(<5.4)
|
||||
@_functionBuilder
|
||||
public enum ComponentsBuilderPreview { }
|
||||
public typealias ComponentsBuilder = ComponentsBuilderPreview
|
||||
public enum ComponentsBuilder { }
|
||||
#else
|
||||
@resultBuilder
|
||||
public enum ComponentsBuilder { }
|
||||
#endif
|
||||
|
||||
extension ComponentsBuilder {
|
||||
public static func buildBlock(_ components: Component...) -> [Component] {
|
||||
|
|
|
|||
Loading…
Reference in New Issue