I’ve always found that it’s more reliable to use fully-qualified package
names with `for-label`, e.g.

(require (for-label jordan/package))

rather than

(require (for-label "main.rkt"))

Once upon a time I had similar problems, and noticed that fully-qualified
names is the habit used in many internal Racket packages. The reasons why
this works are dimly remembered. I presume it has something to do with the
fact that all Scribble docs are rendered into the main docs directory for
your installation, thus breaking local paths that wander outside your
'scribblings' subdirectory.

On Fri, Jul 24, 2015 at 8:58 AM, Jordan Johnson <j...@fellowhuman.com> wrote:

> Hi all,
>
> I have a file *main.scrbl* in the same directory as a file *main.rkt*. In
> the .scrbl file, I have
>
> (require (for-label "main.rkt"))
>
> and several *defproc* and *defstruct** forms. For some reason, one of my
> *defstruct** forms works as expected, while all of the other *defstruct** and
> *defproc* forms produce undefined-tag warnings (when I build the docs via
> raco setup), and compile to a red-underlined name in the resulting HTML.
>
> In DrRacket, mousing over the struct names in *main.scrbl*, I see a pink
> arrow with a question mark pointing from the *for-label* line to the
> struct name, and DrRacket correctly reports that the struct name’s binding
> is imported from *main.rkt*.
>
> What might I be missing, that could be causing undefined-tag errors?
>
> Thanks,
> jmj
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to