SwiftyJSON / SwiftyJSON/SwiftyJSON

Compilation breaks in Swift 5.1 Ubuntu 16.04

Open
#1,038 4 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
22.9k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

What did you do?

Build a program that uses SwiftyJSON 5.0.0 as a dependency on Ubuntu 16.04

What did you expect to happen?

Compile cleanly

What actually happened instead?

Compilation failed:

.build/checkouts/SwiftyJSON/Source/SwiftyJSON/SwiftyJSON.swift:1215:51: error: ambiguous use of operator '<'
    case (.number, .number): return lhs.rawNumber < rhs.rawNumber
                                                  ^
.build/checkouts/SwiftyJSON/Source/SwiftyJSON/SwiftyJSON.swift:1251:6: note: found this candidate
func < (lhs: NSNumber, rhs: NSNumber) -> Bool {
     ^
Foundation.NSNumber:2:24: note: found this candidate
    public static func < (lhs: NSNumber, rhs: NSNumber) -> Bool
                       ^

Environment

List the software versions you're using:

  • SwiftyJSON: 5.0.0
  • Linux Version: Ubuntu 16.04.6 LTS
  • Swift Version: Swift version 5.1 (swift-5.1-RELEASE) Target: x86_64-unknown-linux-gnu

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Swift Package Manager: Swift Package Manager - Swift 5.1.0 (790a0c9)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .build/checkouts/SwiftyJSON/Source/SwiftyJSON/SwiftyJSON.swift around lines 1215 and 1251, then reproduce the Swift 5.1 build on Ubuntu 16.04 using Swift Package Manager. Done means the reported comparison compiles cleanly without breaking the existing SwiftyJSON test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.