Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compareJSONString does not detect changes on Linux #384

Closed
norio-nomura opened this issue May 16, 2017 · 5 comments
Closed

compareJSONString does not detect changes on Linux #384

norio-nomura opened this issue May 16, 2017 · 5 comments

Comments

@norio-nomura
Copy link
Collaborator

norio-nomura commented May 16, 2017

It seems comparing nested NSDictionary on Linux does not working at all since Swift 3.0.2. 😞

It works as expected on macOS:

➜  18:33:37 git:(master) βœ— swift
swift_oss_helper command enabled.
Welcome to Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42). Type :help for assistance.
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
$R0: Bool = false
  3>  ^D

It does not work as expected on Linux.
Swift 3.0.2:

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:302 swift -I /usr/lib/swift/clang/include
Welcome to Swift version 3.0.2 (swift-3.0.2-RELEASE). Type :help for assistance.
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
expression failed to parse, unknown error
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
Shared Swift state for repl_swift has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
$R0: Bool = true
  3> ^D

Swift 3.1:

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:31 swift -I /usr/lib/swift/clang/include
Welcome to Swift version 3.1 (swift-3.1-RELEASE). Type :help for assistance.
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
$R0: Bool = true
  3> ^D

Swift 3.1.1:

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:311 swift -I /usr/lib/swift/clang/include
Welcome to Swift version 3.1.1 (swift-3.1.1-RELEASE). Type :help for assistance.
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
$R0: Bool = true
  3> ^D

Swift 4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a:

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:4020170515a swift -I /usr/lib/swift/clang/include
Welcome to Swift version 4.0-dev (LLVM f175cad503, Clang 51f7aba0dc, Swift 79b6334dd8). Type :help for assistance.
  1> import Foundation 
  2. NSDictionary(dictionary: ["key.entities": [["key": 0]]]) == NSDictionary(dictionary: ["key.entities": [["key": 1]]])
$R0: Bool = true
  3> ^D
@norio-nomura
Copy link
Collaborator Author

filed: SR-4903

@norio-nomura
Copy link
Collaborator Author

This issue exists since apple/swift-corelibs-foundation@0f2f4f8.
swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a and swift-3.0-GM-CANDIDATE later.

@norio-nomura
Copy link
Collaborator Author

This issue should have been fixed since followings:
swift-DEVELOPMENT-SNAPSHOT-2017-05-24-a
swift-3.1-DEVELOPMENT-SNAPSHOT-2017-05-25
swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-24-a

@jpsim
Copy link
Owner

jpsim commented May 27, 2017

Yay. Thanks for filing the bug & fix!

@norio-nomura
Copy link
Collaborator Author

This issue has been fixed on Swift 4.0.
Swift 3.1.x with this fixed will not be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants