Repository navigation
fix(export): write graph.json as one line of compact JSON (companion of Graphify-Labs/graphify#4319) - #13
Closed
andrebrait wants to merge 1 commit into
Closed
fix(export): write graph.json as one line of compact JSON (companion of Graphify-Labs/graphify#4319)#13andrebrait wants to merge 1 commit into
andrebrait wants to merge 1 commit into
Conversation
graph.json was pretty-printed (indent=2), so every PR that commits a
rebuilt graph reports tens of thousands of changed lines. GitHub's PR
line counts ignore .gitattributes (-diff, binary), so only the file's
content can fix it: one line of compact JSON is +1 -1.
Every writer of a project graph.json now emits separators=(",", ":")
with no indent: to_json, the `update` raw/no-cluster candidate text,
prune, merge-driver, merge-graphs, `extract --no-cluster` and the global
graph. Readers are unaffected.
`update` compares parsed data, not bytes, so an existing indented graph
would have been "unchanged" forever. It is now rewritten compact once,
then left alone.
Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks for the pull request, @andrebrait. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
6 tasks done
Member
Author
|
@codex review |
Member
Author
|
Upstream shipped this in Graphify 0.9.86 as an authorship-preserving cherry-pick (Graphify-Labs#4319). Closing the review copy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review companion of Graphify-Labs#4319, opened so bot reviews can run in a repository where we can request them. Same head branch (
fix/compact-graph-json) and same base commit (v8at b4e6307, identical to upstreamv8), so the diff is the same. Do not merge here; the change lands through the upstream PR.See Graphify-Labs#4319 for the full description and evidence.