woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to compile on macOS 11.5.2 (Intel MacBook Pro)

weitieda opened this issue · comments

commented

Installed manually and run make install.

Error message as below

/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:32: warning: initialization of 'UnsafeMutablePointer<yaml_version_directive_t>' (aka 'UnsafeMutablePointer<yaml_version_directive_s>') results in a dangling pointer
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:53: note: implicit argument conversion from 'yaml_version_directive_t' (aka 'yaml_version_directive_s') to 'UnsafeMutablePointer<yaml_version_directive_t>' (aka 'UnsafeMutablePointer<yaml_version_directive_s>') produces a pointer valid only for the duration of the call to 'init(_:)'
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                                                    ^~~~~~~~~~~~~~~~~~~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:53: note: use 'withUnsafeMutablePointer' in order to explicitly convert argument to pointer valid for a defined scope
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                                                    ^
/Users/tieda/Desktop/Pecker/.build/checkouts/swift-syntax/Sources/SwiftSyntax/RawSyntax.swift:120:46: error: value of type 'CSyntaxNode' (aka 'swiftparse_syntax_node_t') has no member 'range'
    let textSize = hasCustomText ? Int(cnode.range.length) : 0
                                       ~~~~~ ^~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/swift-syntax/Sources/SwiftSyntax/RawSyntax.swift:153:35: error: value of type 'CSyntaxNode' (aka 'swiftparse_syntax_node_t') has no member 'range'
      let startOffset = Int(cnode.range.offset)
                            ~~~~~ ^~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/swift-syntax/Sources/SwiftSyntax/RawSyntax.swift:157:55: error: value of type 'CSyntaxNode' (aka 'swiftparse_syntax_node_t') has no member 'range'
      let end = utf8.index(begin, offsetBy: Int(cnode.range.length))
                                                ~~~~~ ^~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/swift-syntax/Sources/SwiftSyntax/RawSyntax.swift:873:32: error: value of type 'CSyntaxNode' (aka 'swiftparse_syntax_node_t') has no member 'range'
    let byteLength = Int(cnode.range.length)
                         ~~~~~ ^~~~~
/Users/tieda/Desktop/Pecker/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxParser.swift:195:57: error: missing argument for parameter #3 in call
    let c_top = swiftparse_parse_string(c_parser, source)
                                                        ^
                                                        , <#Int#>
_InternalSwiftSyntaxParser.swiftparse_parse_string:1:13: note: 'swiftparse_parse_string' declared here
public func swiftparse_parse_string(_: swiftparse_parser_t!, _ source: UnsafePointer<CChar>!, _ len: Int) -> swiftparse_client_node_t!
            ^
[101/104] Compiling SwiftSyntax AbsolutePosition.swift
make: *** [build] Error 1

Thanks in advance for looking into this :)