tayloraswift / swift-png

decode, inspect, edit, and encode png images in pure swift

Home Page:https://swiftinit.org/docs/swift-png

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`swift build` doesn't work: cannot find type 'SynchronousTests' in scope

wadetregaskis opened this issue · comments

$ swift build
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:10:11: error: cannot find type 'SynchronousTests' in scope
enum Main:SynchronousTests
          ^~~~~~~~~~~~~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:9:1: error: 'Main' is annotated with @main and must provide a main static function of type () -> Void, () throws -> Void, () async -> Void, or () async throws -> Void
@main 
^
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:10:11: error: an enum with no cases cannot declare a raw type
enum Main:SynchronousTests
          ^
ld: warning: search path '/usr/local/lib' not found
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:10:11: error: cannot find type 'SynchronousTests' in scope
enum Main:SynchronousTests
          ^~~~~~~~~~~~~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:9:1: error: 'Main' is annotated with @main and must provide a main static function of type () -> Void, () throws -> Void, () async -> Void, or () async throws -> Void
@main 
^
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:10:11: error: an enum with no cases cannot declare a raw type
enum Main:SynchronousTests
          ^
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:272:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "error-handling")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:279:19: error: value of type 'Tests' has no member 'group'
            tests.group("decode-\(name)")
            ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:291:15: error: value of type 'Tests' has no member 'group'
        tests.group("decode-iphone-optimized")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:301:15: error: value of type 'Tests' has no member 'group'
        tests.group("encode-iphone-optimized")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNGIntegration/Main.swift:316:23: error: value of type 'Tests' has no member 'group'
                tests.group("encode-\(level)-\(name)")
                ~~~~~ ^~~~~
error: fatalError
ld: warning: search path '/usr/local/lib' not found
error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:10:11: error: cannot find type 'SynchronousTests' in scope
enum Main:SynchronousTests
          ^~~~~~~~~~~~~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:9:1: error: 'Main' is annotated with @main and must provide a main static function of type () -> Void, () throws -> Void, () async -> Void, or () async throws -> Void
@main 
^
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:10:11: error: an enum with no cases cannot declare a raw type
enum Main:SynchronousTests
          ^
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:10:11: error: cannot find type 'SynchronousTests' in scope
enum Main:SynchronousTests
          ^~~~~~~~~~~~~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:9:1: error: 'Main' is annotated with @main and must provide a main static function of type () -> Void, () throws -> Void, () async -> Void, or () async throws -> Void
@main 
^
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:10:11: error: an enum with no cases cannot declare a raw type
enum Main:SynchronousTests
          ^
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:15:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "decode-bitstream")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:19:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "encode-bitstream")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:23:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "match-lz77")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:27:15: error: value of type 'Tests' has no member 'group'
        tests.group("compress-lz77-greedy")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:37:15: error: value of type 'Tests' has no member 'group'
        tests.group("compress-lz77-lazy")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:47:15: error: value of type 'Tests' has no member 'group'
        tests.group("compress-lz77-full")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:57:15: error: value of type 'Tests' has no member 'group'
        tests.group("filtering")
        ~~~~~ ^~~~~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:67:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "premultiplication-8-bit")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:71:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "premultiplication-16-bit")
        ~~~~~ ^~
/Users/wadetregaskis/Documents/swift-png/Tests/PNG/Main.swift:75:15: error: value of type 'Tests' has no member 'do'
        tests.do(name: "dictionary-semantics")
        ~~~~~ ^~
ld: warning: search path '/usr/local/lib' not found
clang: error: unable to execute command: Interrupt: 2
clang: error: linker command failed due to signal (use -v to see invocation)
[12/24] Linking decompression-benchmark

Apple Swift version 5.9 (swiftlang-5.9.0.124.4 clang-1500.0.38.1)
Target: arm64-apple-macosx13.0

From Xcode 15 beta 4 (IIRC).

this seems to be happening because this repository doesn’t ship its Package.resolved pins, which causes SPM to build against a newer version of swift-hash that doesn’t contain the testing tools (they moved to swift-grammar). i’m gonna try to get a PR for this today

the fix has been tagged as 4.0.3. sorry this took so long, i’ve been swamped firefighting folks trying to DoS swiftinit the past month…