Skip to content

net/http: fix the amalgamation for csrf and the file transport - #718

Merged
tamnd merged 1 commit into
mainfrom
csrf-include
Oct 27, 2026
Merged

tamnd merged 1 commit into
mainfrom
csrf-include

Conversation

@tamnd

@tamnd tamnd commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

The problem

The "docs examples (macos-latest)" job on #716 failed before it built anything. The log shows:

burrow-gen: src/net/http_csrf.c is outside the core directories, so it is part of a package, and the first burrow header it includes is include/burrow/core.h, which has no burrow:package line

burrow-gen puts each source file in the package of the first burrow header it includes. http_csrf.c (#711) started with core.h, and http_filetransport.c (#713) started with chan.h. Neither header has a package line. Both PRs were merged before their CI finished, so main has had this since then.

The fix

File Change
src/net/http_csrf.c Includes burrow/net/http.h first, in a block of its own so clang-format keeps it there. It also drops its own #define S, since core.h defines S under BURROW_SHORT and the amalgamation would undefine it after the file. It uses BURROW_S now.
src/net/http_filetransport.c Includes burrow/net/http.h first.

Checks

I ran tools/burrow-gen amalgamate locally on this branch. Before the fix it stopped on each problem in turn: http_csrf.c's package, then http_filetransport.c's, then the S macro. With the fix it prints burrow-gen: 355 headers and 595 sources to .... Both files pass the syntax check with -Wall -Wextra and clang-format. Nothing was built or run on the servers, because none of them has 5G free.

burrow-gen puts a source file in the package of the first burrow
header it includes. http_csrf.c and http_filetransport.c started with
core.h and chan.h, which have no burrow:package line, so the
amalgamation and the docs examples job failed. Include net/http.h
first, and drop http_csrf.c's own S macro, which clashes with
core.h's.
@tamnd tamnd added the area: pure Packages with no OS and no concurrency: strings through regexp label Oct 27, 2026
@tamnd
tamnd merged commit fb0758f into main Oct 27, 2026
0 of 44 checks passed
@tamnd
tamnd deleted the csrf-include branch October 27, 2026 13:08
@tamnd tamnd mentioned this pull request Oct 27, 2026
23 of 27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: pure Packages with no OS and no concurrency: strings through regexp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant