I'm attempting to link to Scribble docs provided by a third party (as opposed to core) library (specifically, data/collection), but I'm having trouble getting it to work.
With these imports:
@require[scribble/manual
scribble-abbrevs/manual
scribble/example
racket/sandbox
@for-label[(only-in racket
(foldl f:foldl)
(foldr f:foldr))
(only-in data/collection
(foldl d:foldl)]]
The following link to Racket built-in docs works:
@racketlink[f:foldl "foldl"]
But this one, to the data/collection version:
@racketlink[d:foldl "foldl"]
... results in the following error:
raco setup: WARNING: undefined tag in <pkgs>/relation/scribblings/relation.scrbl:
raco setup: (undef "--UNDEFINED:d:foldl--")
raco setup: ((lib "data/collection.rkt") foldl)
I also attempted using the @tech tag, something like:
@tech[#:doc '(lib "scribblings/data/collection/collections.scrbl")]{"foldl"}
I tried several variants of this and wasn't able to get it to work -- one thing I couldn't uncover in my scanning of the documentation, for instance here, was how the lib link works -- what exactly is the path referring to? Evidently, "scribblings" does not refer to the local scribblings folder but some kind of global documentation path. But how does one know what path to use for a particular library's documentation? This is perhaps more of a secondary question to the primary one being asked above, but any light you can shed here would be helpful.
The problem is that you only install
collections-lib. This does not include its documentation which lives atcollections-doc.So either install the package
collections-docor the (meta-)packagecollectionswhich will include bothcollections-libandcollections-doc. Then, runraco setup relationto re-render your documentation. This would suffice for your own builds.You probably should also modify
info.rktso that other people who install your package download the desired dependencies. There are a couple of ways to set this up.collectionsindeps, which will require users to install the meta-packagecollections, hence installing bothcollections-libandcollections-doc.collections-libindeps(you did this already) and putcollections-docinbuild-deps. An advantage of this approach is that users won't be required to download all tools necessary for building documentation if they install your package as a binary package (which will pre-renders the documentation already).