[1296] 修复样式环境计算丢失文档上下文导致嵌套 use-package 解析失败 - #4549
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
样式宏环境经 typeset_style_use_cache → get_style_env 计算,临时 env 的 base_file_name 恒为 $PWD/none,本地优先解析在样式包内嵌套 use-package (如 ccnu_beamer.stem 引用 beamer/daxue_beamer)时以当前工作目录为基准 必然 miss,title-slide 等宏缺失且失败结果被磁盘样式缓存固化。 compute_env_and_drd/get_style_env/get_style_drd 增加 url master 参数, edit_typeset 传入 buf->buf->master;无 buffer 上下文的调用方传 url_none。 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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.
What
$TEXMACS_PATH下typeset_style_use_cache→get_style_env→compute_env_and_drd计算,临时 env 的base_file_name恒为$PWD/none(当前工作目录),本地优先解析在样式包内嵌套use-package(如ccnu_beamer.stem的(use-package "beamer/daxue_beamer"))时必然 miss,title-slide等宏缺失,且失败结果被磁盘样式缓存固化(style_set_cache仅在缓存文件不存在时写入)How
compute_env_and_drd/get_style_env/get_style_drd增加url master参数,临时 env 的 base 取is_none (master) ? $PWD/none : masteredit_typeset.cpp传buf->buf->master;tm_button.cpp(无 buffer 上下文)与get_document_drd传url_none ()tree_analyze.cpp中get_style_drd的过期重复声明验证
首页 title-slide 封面渲染正确(修复前渲染为红色
⟨title-slide⟩标记);南方科技大学模板同法验证通过。已知取舍
样式缓存 key 含解析后的样式绝对路径但不含 master,同一绝对路径样式被不同目录文档共享时,嵌套相对
use-package的解析结果以首次计算为准;旧版本写入的坏缓存需手动清理(缓存目录按版本号隔离,发版即自然失效)。🤖 Generated with Claude Code