swiftlang / swift-foundation

The Foundation project
Apache License 2.0
2.4k stars 160 forks source link

Revert "Fix JSONEncoder performance regression in 6.0 toolchain" #1009

Closed hjyamauchi closed 2 weeks ago

hjyamauchi commented 2 weeks ago

Reverts swiftlang/swift-foundation#1006

hjyamauchi commented 2 weeks ago

@swift-ci please test

hjyamauchi commented 2 weeks ago

Hi @kperryua :) I think you're probably looking into this, but it appears that the CI https://ci-external.swift.org/job/swift-PR-windows is broken at https://github.com/swiftlang/swift-foundation/pull/1006 and blocking the PRs. This temporary PR seems to how that the CI passes with a revert. What do you think of reverting it? Thank you

For example, https://ci-external.swift.org/job/swift-PR-windows/32609/consoleText https://ci-external.swift.org/job/swift-PR-windows/32610/consoleText https://ci-external.swift.org/job/swift-PR-windows/32612/consoleText

TestJSonEncoder failures:

TestFoundation/TestJSONEncoder.swift:1064: error: TestJSONEncoder.test_encodingDateCustom : XCTAssertEqual failed: ("JSON(jsonObject: [42])") is not equal to ("JSON(jsonObject: [[:]])") - Produced JSON not identical to expected JSON.

TestFoundation/TestJSONEncoder.swift:1064: error: TestJSONEncoder.test_encodingDateFormatted : XCTAssertEqual failed: ("JSON(jsonObject: ["Thursday, 1 January 1970 at 12:16:40 AM Greenwich Mean Time"])") is not equal to ("JSON(jsonObject: [[:]])") - Produced JSON not identical to expected JSON.

TestFoundation/TestJSONEncoder.swift:1075: error: TestJSONEncoder.test_encodingDateFormatted : failed - Failed to decode (TopLevelArrayWrapper in _845CC7E595F11E7F77C76EC5CBA6E9D7)<Date> from JSON: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [_CodingKey(stringValue: "Index 0", intValue: 0)], debugDescription: "Expected to decode String but found a dictionary instead.", underlyingError: nil))
...
kperryua commented 2 weeks ago

It's already reverted on main, thanks!

hjyamauchi commented 2 weeks ago

@kperryua oh sorry didn't realize it. thank you!