Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

"Protected" error when re-providing a third party function

未关闭
#283 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
领域
documentation

调研方向

复现涉及调用 mischief/function 的 require/provide 示例中的文档构建失败,然后检查 scribblings/composition.scrbl 以及堆栈跟踪中指定的 Scribble 求值路径,包括 scribble/eval.rkt。当第三方函数被重新提供时,文档构建不再引发 dynamic-require: name is protected,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug

Hello,
I attempted to re-provide a function from a third party module (call from mischief/function) in my module, without modification. E.g.:

(require (only-in mischief/function call))
(provide call)

The code built successfully and the tests passed, but the Scribble docs failed to build with dynamic-require: name is protected (full error pasted below).

As a workaround, I manually copied the implementation from the third party source and provided it afresh from within my module without require-ing it; this is the commit that does that. This works, as expected. [Note: I just noticed that there is a redundant deftogether in that commit - this does not affect the error either way (I just checked).]

Environment
Racket 7.8 CS

Full error message:

Note that the error implicates a module (composition.scrbl) that isn't modified by the offending code.

examples: exception raised in example
  error: "dynamic-require: name is protected\n  name: 'syntax-local-expand-observer\n  module: #<resolved-module-path:'#%expobs>"
  context...:
   do-error
   .../scribble/eval.rkt:308:23: with-handlers-handler102
   .../private/more-scheme.rkt:163:2: select-handler/no-breaks
   .../scribble/eval.rkt:356:9
   .../private/map.rkt:40:19: loop
   [repeats 6 more times]
   .../private/manual-vars.rkt:218:40
   .../private/manual-vars.rkt:167:0: *deftogether
   interpret
   loop
   interpret
   [repeats 3 more times]
   proc
   call-in-empty-metacontinuation-frame
   body of "/Users/siddhartha/work/lisp/racket/relation/scribblings/composition.scrbl"
   interpret-expr

  context...:
   do-error
   call-in-empty-metacontinuation-frame
   .../setup/parallel-do.rkt:332:4: !work-done method in list-queue%
   .../setup/parallel-do.rkt:282:17
   .../setup/parallel-do.rkt:236:4
   dynamic-wind
   .../setup/scribble.rkt:138:0: setup-scribblings
   call-in-empty-metacontinuation-frame
   winder-dummy
   .../setup/setup-core.rkt:72:0: setup-core
   call-in-empty-metacontinuation-frame
   body of "/Applications/Racket v7.8/collects/setup/main.rkt"
   temp35_0
   run-module-instance!
   call-in-empty-metacontinuation-frame
   body of "/Applications/Racket v7.8/collects/raco/main.rkt"
主要语言
Racket
星标
251
派生
101
平均合并
11 天 9 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

racket/scribble 的其他 Issue

查看 racket/scribble 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。