The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build swift-transformers, reference main (d42fda), with Swift 5.8 for macOS (SPM) on 1 Nov 2024 23:49:16 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-14.3.1.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/huggingface/swift-transformers.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/huggingface/swift-transformers
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at d42fdae Update Jinja version (#138)
Cloned https://github.com/huggingface/swift-transformers.git
Revision (git rev-parse @):
d42fdae473c49ea216671da8caae58e102d28709
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/huggingface/swift-transformers.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             5.8
Building package at path:  $PWD
https://github.com/huggingface/swift-transformers.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-14.3.1.app xcrun swift build --arch arm64
[1/1] Compiling plugin GenerateManual
Building for debugging...
[1/5] Copying t5_tokenizer_config.json
[1/5] Copying gpt2_tokenizer_config.json
[4/32] Emitting module ArgumentParserToolInfo
[5/32] Compiling ArgumentParserToolInfo ToolInfo.swift
[6/71] Compiling ArgumentParser InputOrigin.swift
[7/71] Compiling ArgumentParser Name.swift
[8/71] Compiling ArgumentParser Parsed.swift
[9/71] Compiling ArgumentParser ParsedValues.swift
[10/75] Compiling ArgumentParser ArgumentHelp.swift
[11/75] Compiling ArgumentParser ArgumentVisibility.swift
[12/75] Compiling ArgumentParser CompletionKind.swift
[13/75] Compiling ArgumentParser Errors.swift
[14/75] Compiling ArgumentParser Flag.swift
[15/75] Compiling ArgumentParser BashCompletionsGenerator.swift
[16/75] Compiling ArgumentParser CompletionsGenerator.swift
[17/75] Compiling ArgumentParser FishCompletionsGenerator.swift
[18/75] Compiling ArgumentParser ZshCompletionsGenerator.swift
[19/75] Compiling ArgumentParser Argument.swift
[20/75] Emitting module ArgumentParser
[21/75] Compiling ArgumentParser NameSpecification.swift
[22/75] Compiling ArgumentParser Option.swift
[23/75] Compiling ArgumentParser OptionGroup.swift
[24/75] Compiling ArgumentParser AsyncParsableCommand.swift
[25/75] Compiling ArgumentParser ParsableArguments.swift
[26/75] Compiling ArgumentParser ParsableArgumentsValidation.swift
[27/75] Compiling ArgumentParser ParsableCommand.swift
[28/75] Compiling ArgumentParser ArgumentDecoder.swift
[29/75] Compiling ArgumentParser Platform.swift
[30/75] Compiling ArgumentParser SequenceExtensions.swift
[31/75] Compiling ArgumentParser StringExtensions.swift
[32/75] Compiling ArgumentParser Tree.swift
[33/75] Compiling Hub resource_bundle_accessor.swift
[34/75] Compiling Jinja Utilities.swift
[35/75] Compiling Jinja Template.swift
[36/75] Emitting module Hub
[37/75] Compiling Hub Hub.swift
[38/75] Compiling Jinja Parser.swift
[39/75] Compiling Jinja Lexer.swift
[40/75] Compiling Jinja Error.swift
[41/75] Compiling Jinja StringExtension.swift
[42/75] Compiling Hub Downloader.swift
[43/75] Compiling Jinja Environment.swift
[44/75] Compiling Hub HubApi.swift
[45/75] Compiling Jinja Ast.swift
[46/75] Emitting module Jinja
[47/75] Compiling Jinja Runtime.swift
[48/87] Compiling ArgumentParser ParserError.swift
[49/87] Compiling ArgumentParser SplitArguments.swift
[50/87] Compiling ArgumentParser DumpHelpGenerator.swift
[51/87] Compiling ArgumentParser HelpCommand.swift
[52/87] Compiling ArgumentParser CommandConfiguration.swift
[53/87] Compiling ArgumentParser CommandGroup.swift
[54/87] Compiling ArgumentParser EnumerableFlag.swift
[55/87] Compiling ArgumentParser ExpressibleByArgument.swift
[56/87] Compiling ArgumentParser ArgumentDefinition.swift
[57/87] Compiling ArgumentParser ArgumentSet.swift
[58/87] Compiling ArgumentParser CommandParser.swift
[59/87] Compiling ArgumentParser InputKey.swift
[60/87] Compiling ArgumentParser HelpGenerator.swift
[61/87] Compiling ArgumentParser MessageInfo.swift
[62/87] Compiling ArgumentParser UsageGenerator.swift
[63/87] Compiling ArgumentParser CollectionExtensions.swift
[64/89] Compiling Tokenizers UnigramTokenizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: error: 'any IteratorProtocol' is not convertible to 'any IteratorProtocol<T>'
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                                            ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: note: did you mean to use 'as!' to force downcast?
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
                                            as!
[65/89] Compiling Tokenizers Trie.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: error: 'any IteratorProtocol' is not convertible to 'any IteratorProtocol<T>'
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                                            ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: note: did you mean to use 'as!' to force downcast?
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
                                            as!
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:25:41: error: subscript 'subscript(_:)' requires that 'R' conform to 'RangeExpression'
            if let child = node.children[item] {
                                        ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:29:31: error: cannot convert value of type 'Any' to expected argument type 'T'
                node.children[item] = child
                              ^
                                   as! T
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:37:30: error: type of expression is ambiguous without more context
        for t in container { insert(t) }
                             ^~~~~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:47:17: error: no exact matches in call to instance method 'append'
            seq.append(item)
                ^
Swift.Array:6:37: note: candidate expects value of type 'T' for parameter #1 (got 'Any')
    @inlinable public mutating func append(_ newElement: __owned Element)
                                    ^
Swift.RangeReplaceableCollection:4:37: note: candidate expects value of type 'T' for parameter #1 (got 'Any')
    @inlinable public mutating func append(_ newElement: __owned Self.Element)
                                    ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:47:17: note: found candidate with type '(__owned Any) -> ()'
            seq.append(item)
                ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:47:17: note: found candidate with type '(__owned Any) -> ()'
            seq.append(item)
                ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:48:44: error: subscript 'subscript(_:)' requires that 'R' conform to 'RangeExpression'
            guard let child = node.children[item] else { return seqs }
                                           ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:60:16: error: generic parameter 'T' could not be inferred
        return LeavesWithCommonPrefixIterator(node: root, text: text)
               ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:82:46: note: 'T' declared as parameter to type 'LeavesWithCommonPrefixIterator'
public struct LeavesWithCommonPrefixIterator<T: Hashable> : Sequence, IteratorProtocol {
                                             ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:60:16: note: explicitly specify the generic arguments to fix this issue
        return LeavesWithCommonPrefixIterator(node: root, text: text)
               ^
                                             <<#T: Hashable#>>
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:69:44: error: subscript 'subscript(_:)' requires that 'R' conform to 'RangeExpression'
            guard let child = node.children[item] else { return nil }
                                           ^
[66/90] Compiling Tokenizers TokenLattice.swift
[67/90] Compiling TensorUtils MLMultiArray+Utils.swift
[68/90] Compiling TensorUtils MLShapedArray+Utils.swift
[69/90] Compiling TensorUtils RepetitionPenaltyWarper.swift
[70/90] Compiling TensorUtils TopPLogitsWarper.swift
[71/90] Compiling TensorUtils TopKLogitsWarper.swift
[72/90] Emitting module TensorUtils
[73/90] Compiling TensorUtils LogitsProcessor.swift
[74/90] Compiling TensorUtils LogitsWarper.swift
[75/90] Compiling TensorUtils Math.swift
[76/90] Compiling TensorUtils TemperatureLogitsWarper.swift
[77/90] Compiling HubCLI HubCLI.swift
[78/90] Emitting module HubCLI
[79/90] Compiling Tokenizers Tokenizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Tokenizer.swift:508:49: warning: heterogeneous collection literal could only be inferred to '[String : Any]'; add explicit type annotation if this is intentional
            configDictionary["pre_tokenizer"] = ["type": "Metaspace", "replacement": sentencePieceUnderline, "add_prefix_space": true, "prepend_scheme": "first"]
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                                                                                  as [String : Any]
[80/90] Compiling Tokenizers Normalizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Normalizer.swift:213:17: warning: string literal is unused
                " \(c) "
                ^~~~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Normalizer.swift:215:17: warning: string literal is unused
                "\(c)"
                ^~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Normalizer.swift:217:9: error: missing return in closure expected to return 'String'
        }
        ^
error: emit-module command failed with exit code 1 (use -v to see invocation)
[81/90] Compiling Tokenizers ByteEncoder.swift
[82/90] Compiling Tokenizers Decoder.swift
[83/90] Emitting module Tokenizers
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: error: 'any IteratorProtocol' is not convertible to 'any IteratorProtocol<T>'
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                                            ^
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/Trie.swift:86:45: note: did you mean to use 'as!' to force downcast?
    lazy var iterator = text.makeIterator() as any IteratorProtocol<T>
                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
                                            as!
[84/90] Compiling Tokenizers PostProcessor.swift
[85/90] Compiling Tokenizers PreTokenizer.swift
[86/90] Compiling Tokenizers BPETokenizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:126:17: warning: string literal is unused
                " \(c) "
                ^~~~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:128:17: warning: string literal is unused
                "\(c)"
                ^~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:130:9: error: missing return in closure expected to return 'String'
        }.joined()
        ^
[87/90] Compiling Tokenizers BertTokenizer.swift
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:126:17: warning: string literal is unused
                " \(c) "
                ^~~~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:128:17: warning: string literal is unused
                "\(c)"
                ^~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/Tokenizers/BertTokenizer.swift:130:9: error: missing return in closure expected to return 'String'
        }.joined()
        ^
[88/90] Compiling Tokenizers Utils.swift
[88/90] Linking hub-cli
Fetching https://github.com/maiqingqiang/Jinja
Fetching https://github.com/apple/swift-argument-parser.git
[1/246] Fetching jinja
[247/12599] Fetching jinja, swift-argument-parser
Fetched https://github.com/maiqingqiang/Jinja (2.09s)
Fetched https://github.com/apple/swift-argument-parser.git (2.09s)
Computing version for https://github.com/maiqingqiang/Jinja
Computed https://github.com/maiqingqiang/Jinja at 1.0.6 (0.49s)
Computing version for https://github.com/apple/swift-argument-parser.git
Computed https://github.com/apple/swift-argument-parser.git at 1.5.0 (0.53s)
Creating working copy for https://github.com/maiqingqiang/Jinja
Working copy of https://github.com/maiqingqiang/Jinja resolved at 1.0.6
Creating working copy for https://github.com/apple/swift-argument-parser.git
Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.5.0
BUILD FAILURE 5.8 macosSpm