A long time ago Swift needed to serialize some things to JSON. LLVM already had support for serializing YAML, but the system on the other end (something in Xcode, I think) only understood JSON. Since we needed to get things up and running, we just made a clone of llvm::yaml::Output called swift::json::Output that handled the JSON subset and produced JSON-formatted output.
The right thing to do here is for llvm::yaml::Output to have an option flag that says "please use a JSON-compatible serialization". Then swift::json can go away.
belkadan commentedFeb 1, 2018
Additional Detail from JIRA
md5: 038b2ebe267da90c2f2f955ae2e66064
Issue Description:
A long time ago Swift needed to serialize some things to JSON. LLVM already had support for serializing YAML, but the system on the other end (something in Xcode, I think) only understood JSON. Since we needed to get things up and running, we just made a clone of llvm::yaml::Output called swift::json::Output that handled the JSON subset and produced JSON-formatted output.
The right thing to do here is for llvm::yaml::Output to have an option flag that says "please use a JSON-compatible serialization". Then swift::json can go away.
This task requires making patches and test cases for upstream LLVM, found at https://llvm.org with patches reviewed at https://reviews.llvm.org. Once that's done, we can cherry-pick that to the current release branch for swift-llvm, then adopt it in Swift.
The text was updated successfully, but these errors were encountered: