The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build SwiftTfIdf, reference main (030067), with Swift 6.2 (beta) for macOS (SPM) on 19 Jun 2025 16:22:56 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/aziyan99/SwiftTfIdf.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/aziyan99/SwiftTfIdf
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 0300678 Create CONTRIBUTING.md
Cloned https://github.com/aziyan99/SwiftTfIdf.git
Revision (git rev-parse @):
030067817e1f4867d0177e5d3d3bc01e2d505a90
SUCCESS checkout https://github.com/aziyan99/SwiftTfIdf.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/aziyan99/SwiftTfIdf.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-1EA4D86E10B52AF.txt
[3/4] Emitting module SwiftTfIdf
[4/4] Compiling SwiftTfIdf SwiftTfIdf.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTfIdf/SwiftTfIdf.swift:28:29: error: 'NLTokenizer' is only available in macOS 10.14 or newer
  2 | import Foundation
  3 |
  4 | public class SwiftTfIdf {
    |              `- note: add @available attribute to enclosing class
  5 |     public var rawSentences = [String]() // raw sentences
  6 |     public var topN: Int // how many top word want to get
    :
 19 |
 20 |     // Convert a bunch of sentences to array of words
 21 |     func sentences2ArrayOfWords(sentences: [String]) -> [[String]]{
    |          `- note: add @available attribute to enclosing instance method
 22 |         var arrayOfWordInSentences = [[String]]()
 23 |
    :
 26 |         for sentence in sentences {
 27 |             var words = [String]()
 28 |             let tokenizer = NLTokenizer(unit: .word)
    |                             |- error: 'NLTokenizer' is only available in macOS 10.14 or newer
    |                             `- note: add 'if #available' version check
 29 |             tokenizer.string = sentence
 30 |             tokenizer.enumerateTokens(in: sentence.startIndex..<sentence.endIndex) { tokenRange, _ in
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTfIdf/SwiftTfIdf.swift:28:29: error: 'init(unit:)' is only available in macOS 10.14 or newer
  2 | import Foundation
  3 |
  4 | public class SwiftTfIdf {
    |              `- note: add @available attribute to enclosing class
  5 |     public var rawSentences = [String]() // raw sentences
  6 |     public var topN: Int // how many top word want to get
    :
 19 |
 20 |     // Convert a bunch of sentences to array of words
 21 |     func sentences2ArrayOfWords(sentences: [String]) -> [[String]]{
    |          `- note: add @available attribute to enclosing instance method
 22 |         var arrayOfWordInSentences = [[String]]()
 23 |
    :
 26 |         for sentence in sentences {
 27 |             var words = [String]()
 28 |             let tokenizer = NLTokenizer(unit: .word)
    |                             |- error: 'init(unit:)' is only available in macOS 10.14 or newer
    |                             `- note: add 'if #available' version check
 29 |             tokenizer.string = sentence
 30 |             tokenizer.enumerateTokens(in: sentence.startIndex..<sentence.endIndex) { tokenRange, _ in
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTfIdf/SwiftTfIdf.swift:29:23: error: 'string' is only available in macOS 10.14 or newer
  2 | import Foundation
  3 |
  4 | public class SwiftTfIdf {
    |              `- note: add @available attribute to enclosing class
  5 |     public var rawSentences = [String]() // raw sentences
  6 |     public var topN: Int // how many top word want to get
    :
 19 |
 20 |     // Convert a bunch of sentences to array of words
 21 |     func sentences2ArrayOfWords(sentences: [String]) -> [[String]]{
    |          `- note: add @available attribute to enclosing instance method
 22 |         var arrayOfWordInSentences = [[String]]()
 23 |
    :
 27 |             var words = [String]()
 28 |             let tokenizer = NLTokenizer(unit: .word)
 29 |             tokenizer.string = sentence
    |                       |- error: 'string' is only available in macOS 10.14 or newer
    |                       `- note: add 'if #available' version check
 30 |             tokenizer.enumerateTokens(in: sentence.startIndex..<sentence.endIndex) { tokenRange, _ in
 31 |                 let word = String(sentence[tokenRange])
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTfIdf/SwiftTfIdf.swift:30:23: error: 'enumerateTokens(in:using:)' is only available in macOS 10.14 or newer
  2 | import Foundation
  3 |
  4 | public class SwiftTfIdf {
    |              `- note: add @available attribute to enclosing class
  5 |     public var rawSentences = [String]() // raw sentences
  6 |     public var topN: Int // how many top word want to get
    :
 19 |
 20 |     // Convert a bunch of sentences to array of words
 21 |     func sentences2ArrayOfWords(sentences: [String]) -> [[String]]{
    |          `- note: add @available attribute to enclosing instance method
 22 |         var arrayOfWordInSentences = [[String]]()
 23 |
    :
 28 |             let tokenizer = NLTokenizer(unit: .word)
 29 |             tokenizer.string = sentence
 30 |             tokenizer.enumerateTokens(in: sentence.startIndex..<sentence.endIndex) { tokenRange, _ in
    |                       |- error: 'enumerateTokens(in:using:)' is only available in macOS 10.14 or newer
    |                       `- note: add 'if #available' version check
 31 |                 let word = String(sentence[tokenRange])
 32 |
BUILD FAILURE 6.2 macosSpm