Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): make LocalPersister include trailing newline (#3938)
Summary: We're seeing noise in our diffs because the LocalPersister does not include a trailing newline in its JSON output, but many editors append one automatically (for example, when people inspect the file): <img width="418" alt="image" src="https://user-images.githubusercontent.com/7074/171994227-310aea2d-16ca-4da8-a1dd-e678bebb76ac.png"> Presumably, editors are doing this to be "helpful" because [POSIX defines a "line"](https://stackoverflow.com/a/729795/2103996) as (paraphrasing) "some or no non-newline stuff followed by a newline", but the unexpected diff output can be confusing for developers working in a large project — many of whom may not even know what persisted queries are. This PR makes a small edit to append the newline automatically to Serde JSON's pretty output. Pull Request resolved: #3938 Reviewed By: alunyov Differential Revision: D36937182 Pulled By: captbaritone fbshipit-source-id: 14341811f1885fa2750d1b18576f06b783ea88fa
- Loading branch information