Repository navigation
Conversation
…k snippets get compiled and run
This branch has not been deployed
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.
This PR closes #212
I uncommented the keeper preprocessor and ran
mdbook buildto see what was broken. Everything else either compiles or is markedignore, and the only failing snippets were the two in the Poseidon README: they imported fromronkathon::field(it'sronkathon::algebra::field), called aload_constantsthat only exists in the test module, usedrng,rateandsqueeze_sizewithout defining them, and calledabsorbandsqueezeon a sponge that hadn't been moved into the absorbing or squeezing state.It changes the following:
Both Poseidon snippets now compile and run.
load_constantsis a hidden helper in each snippet (simple round constants and a Cauchy matrix, which is MDS), so the rendered page still reads like before but the code is real. The sponge example goes throughstart_absorbingandstart_squeezing, and the input size is a random number below 100 instead of a randomu32.book.tomlturns the keeper preprocessor back on withoptional = true, so a build without mdbook-keeper installed just prints a warning instead of failing. The README install steps mention it, and itsdoctest_cachefolder is in.gitignore.I couldn't include the CI part, because my token isn't allowed to touch workflow files from a fork. To run it in CI, the "Install mdbook" step in both
mdbook-build.yamlanddeploy.ymlneeds one more line. There are no prebuilt binaries, so it has to be built, and--lockedkeeps it building on the pinned nightly (I checked 0.5.0):cargo install --locked --version 0.5.0 mdbook-keeperOne thing to know: keeper 0.5 prints failing snippets in the build log but doesn't fail the build, so this is visibility rather than a hard gate. The playground question from the comments is separate, this only checks the snippets at build time. Locally the build now has no keeper errors.