-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clerk Analyzer doesn't strip metadata from forms when hashing #489
Comments
craig-latacora
added a commit
to latacora/clerk
that referenced
this issue
May 17, 2023
craig-latacora
added a commit
to latacora/clerk
that referenced
this issue
May 17, 2023
closes nextjournal#489 fix strip-form-meta
This was referenced May 18, 2023
Hey @craig-latacora, Thanks for the issue. Should be able to take a closer look tomorrow or Wednesday if it's still a problem that should be fixed upstream for you. Was the closing intentional or should we reopen it? |
craig-latacora
added a commit
to latacora/clerk
that referenced
this issue
Jul 4, 2023
craig-latacora
added a commit
to latacora/clerk
that referenced
this issue
Aug 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The nextjournal.clerk.analyzer/hash-codeblock function will attempt to print out a form to generate a hash. This will result in bad things happening if the form, when evaluated, tagged it's results with some metadata. That metadata will now be applied to the form itself. That's not much of a problem, except that metadata can be used to set the :tag of a value, and then a print-method can be defined for that tag. That print-method body now will try and print the form (a sequence) and likely blow up.
Here is a quick patch that strips metadata before hashing the form. This works, and I don't think that we need to be sensitive to changes in metadata. However, perhaps the more correct mechanism would collect some part of the metadata and include that as input to the hash.
The text was updated successfully, but these errors were encountered: