Skip to content

Conversation

@benknoble
Copy link

This started because I wanted to remove the path/md5sum output during raco setup; I made a few other (hopefully minor) modifications along the way.

See commits for details. Primary changes:

  • a536e5b (docs: fix contract links, 2024-11-23)
  • 81b2514 (asymptote: simplify string construction, 2024-11-23)
  • a48c878 (asymptote: remove display side-effect, 2024-11-23)

Include more for-label requires and use the correct names for ->,
listof, and image-element? (the latter of which comes from the cached
return value, which invokes image; in the uncached case, a filepath is
returned, which is not actually an image-element?).
Preserve the exact content of the string while using a simpler
construction. I think ~a (display-style) might be redundant on strings,
but without contracts the input might be non-strings, so keep it.

Even simpler would be (apply ~a #:separator "\n" s strs), but that
changes the hash because it misses the final newline. An uncommitted
version used (string-join (map ~a (cons s strs)) "\n" #:after-last "\n")
for a similar effect.
When building the documentation, the call to asymptote outputs the pwd
and the checksum; this interrupts the new progress bar mechanism in
recent Racket versions. Silence it by removing the display entirely.

(Perhaps we should provide a function to get the hash or document how it
is computed? The function could also accept a side-channel to
communicate the hash to, such as a box. Modifying it to return multiple
values would be a breaking change.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant