Skip to content

fix: support string module statics - #1103

Merged
godofecht merged 3 commits into
mainfrom
fix/module-string-static
Oct 1, 2026
Merged

godofecht merged 3 commits into
mainfrom
fix/module-string-static

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Fixes #1086. Permit string literals as module static initializers. The C backend already lowers string values to static character pointers, and this adds a regression program that compiles and runs with warnings treated as errors.

@godofecht
godofecht force-pushed the fix/module-string-static branch from abf4b30 to d3c8fce Compare October 1, 2026 07:14
@godofecht
godofecht force-pushed the fix/module-string-static branch from d3c8fce to 4afd507 Compare October 1, 2026 07:36
@godofecht
godofecht merged commit 9ec5e03 into main Oct 1, 2026
33 checks passed
godofecht added a commit that referenced this pull request Oct 1, 2026
#1103 allows module-level strings (#1086), so the Toolchain struct
behind a pointer static and its tc() accessor (a #1078 workaround) go.
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
#1103 allows module-level strings (#1086), so the Toolchain struct
behind a pointer static and its tc() accessor (a #1078 workaround) go.
@godofecht
godofecht deleted the fix/module-string-static 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: module statics cannot be string

1 participant