Repository navigation
[6228] 插件协议读取兼容 R7RS read-line,修复 goldfish 18.11.40 起插件永久阻塞 - #4756
Merged
PinkMagicFly merged 1 commit intoOct 21, 2026
Merged
Conversation
PinkMagicFly
deleted the
pigmagicfly/6228/plugin-protocol-r7rs-readline
branch
October 21, 2026 09:45
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.
关联任务
devel/6228.stem)概要
修复 Goldfish Scheme 18.11.40 起所有 Goldfish 插件「读完请求后永久阻塞」的问题。
read-line规范为 R7RS 语义,行尾不再保留\n。旧协议读取循环硬编码匹配"<EOF>\n",导致插件无法检测到段末标记,阻塞在下一次read-line,主进程等待超时、GUI 持续转圈;同时逐行拼接多行输入时丢失换行符。改动点
TeXmacs/plugins/goldfish/goldfish/texmacs/protocol.scm:read-paragraph-line-with-eol:行尾缺少换行符时自动补齐\n,保证新旧 Goldfish 版本行为一致,多行代码拼接不粘连;read-paragraph-eof-marker?:兼容"<EOF>"、"<EOF>\n"、"<EOF>\r"、"<EOF>\r\n"四种段末标记形态;read-paragraph-by-visible-eof主循环。TeXmacs/plugins/gnuplot/goldfish/tm-gnuplot.scm:gnuplot-read-code移除本地循环,改调(read-paragraph-by-visible-eof)。TeXmacs/plugins/quiver/goldfish/tm-quiver.scm:quiver-read-code移除本地循环,改调(read-paragraph-by-visible-eof)。TeXmacs/plugins/tikz/goldfish/tm-tikz.scm:tikz-read-code移除本地循环,改调(read-paragraph-by-visible-eof)。TeXmacs/plugins/llm/progs/llm/tests/chat-protocol-test.scm:(texmacs protocol),新增test-read-paragraph-eof-marker覆盖多行段落拼接、空段落与连续空行场景。验收验证
gf fmt --check:通过。xmake build --yes stem && xmake install --yes stem:构建与安装通过。xmake r chat-protocol-test:64 correct, 0 failed(原 61 项 + 新增 3 项全部通过)。printf '(* 2 3)\n<EOF>\n' | gf /tmp/gf-fix-check/run.scm default成功回显^Bscheme:(goldfish-result "6")^E。git diff严格局限于上述 5 个文件,无src/与3rdparty/s7/改动。