(WIP) Use ndjson format - #67
Open
JasonGross wants to merge 2 commits into
Open
Conversation
The pnni/logic/quot ndjson dumps were trivial stub exports, far shorter
than the legacy line dumps. Repoint them at real upstream Lean modules
exported via lean4export (the same path that produces the line dumps):
pnni -> Init.Data.Nat.Basic (4225 decls)
logic -> Init.PropLemmas (7703 decls)
quot -> Init.WF (4336 decls; carries the Quot primitives,
matching the quotient-centric legacy dump)
Commit the dumps as git-LFS *.ndjson.zip (like init/stdlib); tests/Makefile
decompresses them on demand. The tests are now parse-only (Set Lean Just
Parsing), matching ndjson_core/ndjson_init, since full translation of
library-scale dumps is slow/pathological.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SkySkimmer
reviewed
Jul 10, 2026
|
|
||
| # coq_makefile passes CAMLPKGS as compile/link flags but omits them from the | ||
| # generated plugin META, so `Declare ML Module` cannot dynlink yojson. Patch | ||
| # the generated META to add yojson to its findlib requires. |
Collaborator
There was a problem hiding this comment.
commit the META instead of generating it and seding it
Collaborator
There was a problem hiding this comment.
or we could go full dune and drop rocq makefile
SkySkimmer
reviewed
Jul 10, 2026
| | `String ("opaque" | "abbrev") -> () | ||
| | `Assoc fields -> ( | ||
| match List.assoc_opt "regular" fields with | ||
| | Some (`Int _) -> () |
Collaborator
There was a problem hiding this comment.
this should be added to the parsed data and used instead of the "height" strategy when available
SkySkimmer
reviewed
Jul 10, 2026
| forbid_member ~lcnt "isUnsafe" payload; | ||
| require_reducibility_hint ~lcnt payload; | ||
| require_safety ~lcnt payload; | ||
| ignore (require_list ~lcnt "all" payload); |
Collaborator
There was a problem hiding this comment.
what is this "all" thing?
SkySkimmer
reviewed
Jul 10, 2026
|
|
||
| val empty_state : parsing_state | ||
| val is_ndjson_line : string -> bool | ||
| val do_prefix_line : lcnt:int -> parsing_state -> string -> parsing_state |
Collaborator
There was a problem hiding this comment.
what's this "prefix" stuff about?
SkySkimmer
reviewed
Jul 10, 2026
Comment on lines
1
to
+2
| dumps/mathlib.out.zip filter=lfs diff=lfs merge=lfs -text | ||
| dumps/*.ndjson.zip filter=lfs diff=lfs merge=lfs -text |
Collaborator
There was a problem hiding this comment.
maybe should be
Suggested change
| dumps/mathlib.out.zip filter=lfs diff=lfs merge=lfs -text | |
| dumps/*.ndjson.zip filter=lfs diff=lfs merge=lfs -text | |
| dumps/*.zip filter=lfs diff=lfs merge=lfs -text |
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.
No description provided.