racket / racket/scribble

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

Open
#283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

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"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the documentation build failure from the require/provide example involving mischief/function's call, then inspect scribblings/composition.scrbl and the Scribble evaluation path named in the stack trace, including scribble/eval.rkt. Done means the documentation build no longer raises dynamic-require: name is protected when the third-party function is re-provided.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.