Skip to content

fix: allow quoted C strings in cEmbed - #1102

Merged
godofecht merged 2 commits into
mainfrom
fix/embed-escaping
Oct 1, 2026
Merged

godofecht merged 2 commits into
mainfrom
fix/embed-escaping

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Fixes #1089. Decode escaped quote and backslash delimiters from the surrounding Flow string before emitting embedded C. Preserve other C escapes. Adds a regression program that compiles and runs through the C backend.

@godofecht
godofecht merged commit a96c5d6 into main Oct 1, 2026
33 checks passed
godofecht added a commit that referenced this pull request Oct 1, 2026
Both bugs are fixed on main (#1082, #1102). Read SINK fields straight off
the module static, and spell the C strings in the sys.flow and
std.process shims as quoted literals instead of char arrays.
godofecht added a commit that referenced this pull request Oct 1, 2026
* cli, process: drop the #1078 and #1089 workarounds

Both bugs are fixed on main (#1082, #1102). Read SINK fields straight off
the module static, and spell the C strings in the sys.flow and
std.process shims as quoted literals instead of char arrays.

* packaging: drop flow-driver from the Homebrew formula

flow-driver was deleted in #1095. The ./flow stub builds tools/flow_cli
from compiler/bootstrap, so tools/ is always installed beside it.

* parity_typecheck: read logs as text with grep -a

Some frontend logs echo source bytes that are not valid UTF-8. GNU grep
then printed "binary file matches" on stderr 151 times per CI run and
left the message empty. The verdicts and the class table are unchanged.

* cli: keep the toolchain state in string statics

#1103 allows module-level strings (#1086), so the Toolchain struct
behind a pointer static and its tc() accessor (a #1078 workaround) go.

* parity_typecheck: keep the shell line count flat

The shell ratchet counts lines; the rationale for grep -a lives in the
previous commit message.
godofecht added a commit that referenced this pull request Oct 1, 2026
Both bugs are fixed on main (#1082, #1102). Read SINK fields straight off
the module static, and spell the C strings in the sys.flow and
std.process shims as quoted literals instead of char arrays.
@godofecht
godofecht deleted the fix/embed-escaping branch October 1, 2026 12: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.

flowc: @cEmbed text cannot contain a double quote

1 participant