laburnum 1.17.1

An LSP framework for building language servers and compilers, powered by an incremental query tree with content-addressed storage, task-based dataflow, and parallel queries.
Documentation
// Copyright Two Neutron Stars Incorporated and contributors
// SPDX-License-Identifier: BlueOak-1.0.0

#[test]
#[cfg(unix)]
fn run() {
  use crate::protocol::lsif::Entry;

  let jsonl = include_str!("tsc-unix.lsif");
  for json in jsonl.lines() {
    let entry = serde_json::from_str::<Entry>(json)
      .unwrap_or_else(|_| panic!("can not parse {json}"));
    let serialized = serde_json::to_string(&entry)
      .unwrap_or_else(|_| panic!("can not serialize {json}"));

    assert_eq!(
      serde_json::from_str::<serde_json::Value>(&serialized).unwrap(),
      serde_json::from_str::<serde_json::Value>(json).unwrap(),
      "and strings:\ntheir: {json}\n  our: {serialized}",
    );
  }
}