Do the broken references show up when rendering docs with `raco setup`
or `raco pkg {install,update}`, or do they show up when running
`scribble` directly on the ".scrbl" file?

If it's the latter, then that makes sense. When you refer to a module
through a filesystem path, Scribble doesn't try to figure out that the
document is also reachable through a collection path, and that relative
references can therefore be turned into collection-based references.

If you're seeing this behavior when using `raco setup` or `raco pkg`,
then it sounds like a bug. Using collection-based paths instead of
relative paths may be a good idea (to enable directly running
`scribble`, for example), but it shouldn't be required.

At Fri, 24 Jul 2015 21:56:45 -0700, Matthew Butterick wrote:
> 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.

-- 
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