Write cookie attributes one value per call in stringify - #1350
Merged
Conversation
Base's varargs write(io, x1, xs...) iterates a heterogeneous tuple and dispatches each element dynamically, which juliac --trim=safe cannot statically resolve. Cookie stringify used it in four places; writing one value per call is byte-identical in output and compiles to direct calls. The server-side Request rebuild half of this work already landed via #1349. Found trimming a Servo app on Julia nightly (JuliaCon 2026 workshop); together with #1349 this clears the last HTTP-owned verify errors there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quinnj
force-pushed
the
trim-cookie-stringify
branch
from
August 15, 2026 13:37
2fe6b51 to
b314a06
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1350 +/- ##
==========================================
+ Coverage 88.53% 88.55% +0.02%
==========================================
Files 31 31
Lines 11961 11974 +13
==========================================
+ Hits 10590 10604 +14
+ Misses 1371 1370 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
One small change so an HTTP.jl server compiled with
juliac --trim=safeverifies cleanly, found while trimming a Servo application on Julia nightly (JuliaCon 2026 workshop prep).Base's varargs
write(io, x1, xs...)iterates a heterogeneous tuple and dispatches each element dynamically, which the trim verifier cannot resolve (a 5-line program writingwrite(io, "a", '=', "b")fails verification on nightly). Cookiestringifyused it in four places; splitting them into single-value writes produces byte-identical output and compiles to direct calls.The companion change on the server request path (rebuilds through the positional constructor) already landed in #1349 — an earlier draft of this PR duplicated it and has been trimmed down. Together with #1349, HTTP contributes zero verify errors to that app's
--trim=safebuild.Tests:
http_cookie_tests.jlpasses locally (rerun on this rebased branch), and the core/h1 wire suites passed with the same cookie change before the rebase.🤖 Generated with Claude Code
Review follow-up
Validation: focused cookie tests pass. The new trim executable builds and runs with zero verifier errors.
Co-authored by Codex