Skip to content

#3117 (part): a raw C call quotes the package report; three facade drafter fixes - #3258

Merged
ehartford merged 3 commits into
issues-gfrom
issues-h
Nov 11, 2026
Merged

ehartford merged 3 commits into
issues-gfrom
issues-h

Conversation

@ehartford

@ehartford ehartford commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor
  • A call of a function a fetched facade leaves raw quotes the report's reason and names the report file.
  • The report's attribute note for a macro-supplied attribute (curl's CURL_TEMP_PRINTF) no longer holds the header's text between the macro and the declaration.
  • A variadic function is 'raw: variadic' in the draft, not 'lend ... presented safely' (the checker already kept the call raw).
  • A draft with nothing to state writes no facade file; an empty c facade block is refused and the file is applied through every c_import.

The with facade report command is on branch facade-report-cmd, waiting on its §18.5 line.

Battery: GREEN on this commit 2b8ba4d (seed-driven, with uat --strict).

Eric Hartford added 3 commits November 11, 2026 11:00
…its report line; an attribute's text ends at its argument list

A call of a function the fetched facade leaves raw said only 'raw c_import
function call requires unsafe context'. It now quotes the report's reason
and the command that prints it:
  the facade of libcurl leaves `curl_version` raw: returns *mut c_char, a
  pointer to no record (`with facade report c.libcurl curl_version`)
`with facade report c.<package>` prints the report `with get` wrote; with a
function, that function's line.

Found on the way: the report's [attributes: ...] note for a function whose
attribute comes from a macro with arguments (curl's CURL_TEMP_PRINTF(1, 2))
held the header's text from the macro's definition to the declaration. A
macro argument is spelled where the macro is used, so the attribute's range
ran that far. cimport_spelled_text now ends at the attribute's balanced
argument list, and the declaration's own token scan skips an extent a macro
ends.

Test: test/internals/conan_facade_macro_attribute_test.w (failed before with
the #else/#define text in the note).
…test for the note and the report command

Test: test/behavior/behav_3117_facade_report.w (failed before: the call said
only 'unsafe function call requires unsafe context', and `with facade` was
an unknown command).
…the draft; an itemless draft writes no facade

The `with facade report` command moves to its own branch: it adds a CLI
command, which the spec's command list must name first.

The raw-call note now ends with the report's path.

The drafter reported a variadic function with presentable fixed parameters
as 'lend ... presented safely' and wrote an fn item for it. The checker
kept the call raw, so nothing unsafe compiled, but the report's count and
the item were wrong. It is now 'raw: variadic' (§16.2b.5).

A draft with nothing to state was written as an empty `c facade` block,
which the parser refuses, and the file is applied through every c_import of
the package's headers. No facade file is written then, and the report says
so.
@ehartford
ehartford added this pull request to stack #3259 November 11, 2026 19:48
@ehartford ehartford changed the title issues h #3117 (part): a raw C call quotes the package report; three facade drafter fixes Nov 11, 2026
@ehartford
ehartford marked this pull request as ready for review November 11, 2026 19:48
@ehartford
ehartford merged commit 1fbe286 into main Nov 11, 2026
@ehartford
ehartford deleted the issues-h branch November 11, 2026 19:49
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