The Swift Package Index logo.Swift Package Index

Build Information

Successful build of SwiftRandom, reference master (dc56ac), with Swift 6.2 for Linux on 20 Jun 2025 23:45:14 UTC.

Swift 6 data race errors: 0

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/iamjono/SwiftRandom.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/iamjono/SwiftRandom
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at dc56acb adding swift 4 SPM convention
Cloned https://github.com/iamjono/SwiftRandom.git
Revision (git rev-parse @):
dc56acbbe52138b38473c79f31d06417f420ad11
SUCCESS checkout https://github.com/iamjono/SwiftRandom.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.2
Building package at path:  $PWD
https://github.com/iamjono/SwiftRandom.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:f81a7bd7aa87a0f81848d48c5bcc03f5f78deebd37fa5f9be9913077205d3687
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/6] Compiling SwiftRandom Randoms.swift
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:18:5: warning: 'public' modifier is redundant for static method declared in a public extension
 16 | public extension Bool {
 17 |     /// SwiftRandom extension
 18 |     public static func random() -> Bool {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 19 |         return Int.random() % 2 == 0
 20 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:25:5: warning: 'public' modifier is redundant for static method declared in a public extension
 23 | public extension Int {
 24 |     /// SwiftRandom extension
 25 |     public static func random(range: Range<Int>) -> Int {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 26 |         return random(lower: range.lowerBound, range.upperBound)
 27 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:30:5: warning: 'public' modifier is redundant for static method declared in a public extension
 28 |
 29 |     /// SwiftRandom extension
 30 |     public static func random(lower: Int = 0, _ upper: Int = 100) -> Int {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 31 | 		let rand = URandom()
 32 | 		let val = abs(rand.int % Int(upper - lower + 1))
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:39:5: warning: 'public' modifier is redundant for static method declared in a public extension
 37 | public extension Int32 {
 38 |     /// SwiftRandom extension
 39 |     public static func random(range: Range<Int>) -> Int32 {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 40 |         return random(lower: range.lowerBound, range.upperBound)
 41 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:46:5: warning: 'public' modifier is redundant for static method declared in a public extension
 44 |     ///
 45 |     /// - note: Using `Int` as parameter type as we usually just want to write `Int32.random(13, 37)` and not `Int32.random(Int32(13), Int32(37))`
 46 |     public static func random(lower: Int = 0, _ upper: Int = 100) -> Int32 {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 47 | 		let rand = URandom()
 48 | 		let val = abs(rand.int32 % Int32(upper - lower + 1))
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:55:5: warning: 'public' modifier is redundant for static method declared in a public extension
 53 | public extension Double {
 54 |     /// SwiftRandom extension
 55 |     public static func random(lower: Double = 0, _ upper: Double = 100) -> Double {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 56 | 		let rand = URandom()
 57 |         return (Swift.abs(Double(rand.int32)) / 0xFFFFFFFF) * (upper - lower) + lower
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:63:5: warning: 'public' modifier is redundant for static method declared in a public extension
 61 | public extension Float {
 62 |     /// SwiftRandom extension
 63 |     public static func random(lower: Float = 0, _ upper: Float = 100) -> Float {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 64 | 		let rand = URandom()
 65 |         return (Swift.abs(Float(rand.int32)) / 0xFFFFFFFF) * (upper - lower) + lower
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:71:5: warning: 'public' modifier is redundant for static method declared in a public extension
 69 | public extension Date {
 70 |     /// SwiftRandom extension
 71 |     public static func randomWithinDaysBeforeToday(days: Int) -> Date {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 72 |         let today = Date()
 73 | 		let rand = URandom()
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:102:5: warning: 'public' modifier is redundant for static method declared in a public extension
100 |
101 |     /// SwiftRandom extension
102 |     public static func random() -> Date {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
103 | //        let randomTime = TimeInterval(arc4random_uniform(UInt32.max))
104 | 		let rand = URandom()
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:114:5: warning: 'public' modifier is redundant for instance method declared in a public extension
112 | public extension Array {
113 |     /// SwiftRandom extension
114 |     public func randomItem() -> Element? {
    |     `- warning: 'public' modifier is redundant for instance method declared in a public extension
115 |         guard self.count > 0 else {
116 |             return nil
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:128:5: warning: 'public' modifier is redundant for instance method declared in a public extension
126 | public extension ArraySlice {
127 |     /// SwiftRandom extension
128 |     public func randomItem() -> Element? {
    |     `- warning: 'public' modifier is redundant for instance method declared in a public extension
129 |         guard self.count > 0 else {
130 |             return nil
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:140:5: warning: 'public' modifier is redundant for static method declared in a public extension
138 | public extension URL {
139 |     /// SwiftRandom extension
140 |     public static func random() -> URL {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
141 |         let urlList = ["http://www.google.com", "http://leagueoflegends.com/", "https://github.com/", "http://stackoverflow.com/", "https://medium.com/", "http://9gag.com/", "http://imgur.com/", "https://www.youtube.com/"]
142 |         return URL(string: urlList.randomItem()!)!
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:65:48: warning: '4294967295' is not exactly representable as 'Float'; it becomes '4294967296'
 63 |     public static func random(lower: Float = 0, _ upper: Float = 100) -> Float {
 64 | 		let rand = URandom()
 65 |         return (Swift.abs(Float(rand.int32)) / 0xFFFFFFFF) * (upper - lower) + lower
    |                                                `- warning: '4294967295' is not exactly representable as 'Float'; it becomes '4294967296'
 66 |     }
 67 | }
[4/6] Emitting module SwiftRandom
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:18:5: warning: 'public' modifier is redundant for static method declared in a public extension
 16 | public extension Bool {
 17 |     /// SwiftRandom extension
 18 |     public static func random() -> Bool {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 19 |         return Int.random() % 2 == 0
 20 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:25:5: warning: 'public' modifier is redundant for static method declared in a public extension
 23 | public extension Int {
 24 |     /// SwiftRandom extension
 25 |     public static func random(range: Range<Int>) -> Int {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 26 |         return random(lower: range.lowerBound, range.upperBound)
 27 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:30:5: warning: 'public' modifier is redundant for static method declared in a public extension
 28 |
 29 |     /// SwiftRandom extension
 30 |     public static func random(lower: Int = 0, _ upper: Int = 100) -> Int {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 31 | 		let rand = URandom()
 32 | 		let val = abs(rand.int % Int(upper - lower + 1))
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:39:5: warning: 'public' modifier is redundant for static method declared in a public extension
 37 | public extension Int32 {
 38 |     /// SwiftRandom extension
 39 |     public static func random(range: Range<Int>) -> Int32 {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 40 |         return random(lower: range.lowerBound, range.upperBound)
 41 |     }
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:46:5: warning: 'public' modifier is redundant for static method declared in a public extension
 44 |     ///
 45 |     /// - note: Using `Int` as parameter type as we usually just want to write `Int32.random(13, 37)` and not `Int32.random(Int32(13), Int32(37))`
 46 |     public static func random(lower: Int = 0, _ upper: Int = 100) -> Int32 {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 47 | 		let rand = URandom()
 48 | 		let val = abs(rand.int32 % Int32(upper - lower + 1))
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:55:5: warning: 'public' modifier is redundant for static method declared in a public extension
 53 | public extension Double {
 54 |     /// SwiftRandom extension
 55 |     public static func random(lower: Double = 0, _ upper: Double = 100) -> Double {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 56 | 		let rand = URandom()
 57 |         return (Swift.abs(Double(rand.int32)) / 0xFFFFFFFF) * (upper - lower) + lower
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:63:5: warning: 'public' modifier is redundant for static method declared in a public extension
 61 | public extension Float {
 62 |     /// SwiftRandom extension
 63 |     public static func random(lower: Float = 0, _ upper: Float = 100) -> Float {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 64 | 		let rand = URandom()
 65 |         return (Swift.abs(Float(rand.int32)) / 0xFFFFFFFF) * (upper - lower) + lower
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:71:5: warning: 'public' modifier is redundant for static method declared in a public extension
 69 | public extension Date {
 70 |     /// SwiftRandom extension
 71 |     public static func randomWithinDaysBeforeToday(days: Int) -> Date {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
 72 |         let today = Date()
 73 | 		let rand = URandom()
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:102:5: warning: 'public' modifier is redundant for static method declared in a public extension
100 |
101 |     /// SwiftRandom extension
102 |     public static func random() -> Date {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
103 | //        let randomTime = TimeInterval(arc4random_uniform(UInt32.max))
104 | 		let rand = URandom()
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:114:5: warning: 'public' modifier is redundant for instance method declared in a public extension
112 | public extension Array {
113 |     /// SwiftRandom extension
114 |     public func randomItem() -> Element? {
    |     `- warning: 'public' modifier is redundant for instance method declared in a public extension
115 |         guard self.count > 0 else {
116 |             return nil
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:128:5: warning: 'public' modifier is redundant for instance method declared in a public extension
126 | public extension ArraySlice {
127 |     /// SwiftRandom extension
128 |     public func randomItem() -> Element? {
    |     `- warning: 'public' modifier is redundant for instance method declared in a public extension
129 |         guard self.count > 0 else {
130 |             return nil
/host/spi-builder-workspace/Sources/SwiftRandom/Randoms.swift:140:5: warning: 'public' modifier is redundant for static method declared in a public extension
138 | public extension URL {
139 |     /// SwiftRandom extension
140 |     public static func random() -> URL {
    |     `- warning: 'public' modifier is redundant for static method declared in a public extension
141 |         let urlList = ["http://www.google.com", "http://leagueoflegends.com/", "https://github.com/", "http://stackoverflow.com/", "https://medium.com/", "http://9gag.com/", "http://imgur.com/", "https://www.youtube.com/"]
142 |         return URL(string: urlList.randomItem()!)!
[5/6] Compiling SwiftRandom Random.swift
[6/6] Compiling SwiftRandom URandom.swift
/host/spi-builder-workspace/Sources/SwiftRandom/URandom.swift:62:16: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 60 |     public var int16: Int16 {
 61 |         let bytes = read(numBytes: 2)
 62 |         return UnsafeMutableRawPointer(mutating: bytes).assumingMemoryBound(to: Int16.self).pointee
    |                |                                 |- note: implicit argument conversion from '[Int8]' to 'UnsafeRawPointer' produces a pointer valid only for the duration of the call to 'init(mutating:)'
    |                |                                 `- note: use the 'withUnsafeBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 63 |     }
 64 |
/host/spi-builder-workspace/Sources/SwiftRandom/URandom.swift:73:16: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 71 |     public var int32: Int32 {
 72 |         let bytes = read(numBytes: 4)
 73 |         return UnsafeMutableRawPointer(mutating: bytes).assumingMemoryBound(to: Int32.self).pointee
    |                |                                 |- note: implicit argument conversion from '[Int8]' to 'UnsafeRawPointer' produces a pointer valid only for the duration of the call to 'init(mutating:)'
    |                |                                 `- note: use the 'withUnsafeBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 74 |     }
 75 |
/host/spi-builder-workspace/Sources/SwiftRandom/URandom.swift:84:16: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 82 |     public var int64: Int64 {
 83 |         let bytes = read(numBytes: 8)
 84 |         return UnsafeMutableRawPointer(mutating: bytes).assumingMemoryBound(to: Int64.self).pointee
    |                |                                 |- note: implicit argument conversion from '[Int8]' to 'UnsafeRawPointer' produces a pointer valid only for the duration of the call to 'init(mutating:)'
    |                |                                 `- note: use the 'withUnsafeBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 85 |     }
 86 |
/host/spi-builder-workspace/Sources/SwiftRandom/URandom.swift:95:16: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 93 |     public var int: Int {
 94 |         let bytes = read(numBytes: MemoryLayout<Int>.size)
 95 |         return UnsafeMutableRawPointer(mutating: bytes).assumingMemoryBound(to: Int.self).pointee
    |                |                                 |- note: implicit argument conversion from '[Int8]' to 'UnsafeRawPointer' produces a pointer valid only for the duration of the call to 'init(mutating:)'
    |                |                                 `- note: use the 'withUnsafeBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer [#TemporaryPointers]
 96 |     }
 97 |
[#TemporaryPointers]: <https://docs.swift.org/compiler/documentation/diagnostics/temporary-pointers>
Build complete! (9.59s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftRandom",
  "name" : "SwiftRandom",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftRandom",
      "targets" : [
        "SwiftRandom"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "4"
  ],
  "targets" : [
    {
      "c99name" : "SwiftRandomTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRandomTests",
      "path" : "Tests/SwiftRandomTests",
      "sources" : [
        "SwiftRandomTests.swift"
      ],
      "target_dependencies" : [
        "SwiftRandom"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftRandom",
      "module_type" : "SwiftTarget",
      "name" : "SwiftRandom",
      "path" : "Sources/SwiftRandom",
      "product_memberships" : [
        "SwiftRandom"
      ],
      "sources" : [
        "Random.swift",
        "Randoms.swift",
        "URandom.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
basic-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:f81a7bd7aa87a0f81848d48c5bcc03f5f78deebd37fa5f9be9913077205d3687
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.2-latest
Done.