On 9/28/21, David Storrs <[email protected]> wrote:
> Summary:  Documentation for a new module is not being generated when I
> would expect it to be and when I do it manually it ends up not linking
> basic Racket items.  I've done a lot of searching to figure it out and
> would appreciate some help.

I cloned the try-catch repo (744f217), ran raco pkg install, and got a
nicely-rendered document. Log attached.

The only problem I saw is that `try` isn't linked. You can fix that by
adding a `(require (for-label try-catch))`.


> Long version:
>
> I published a module a few days ago called try-catch.  I have an announce
> email written up for it but I was waiting for the documentation to generate
> before sending.  It still hasn't generated so today I investigated.
>
> First thing I did was make sure that raco was using the local copy for
> everything:
>
> $ raco pkg remove try-catch
> raco pkg remove: invalid `deps' specification
>   specification: '("base" racket/format racket/string)
>
> Weird.
>
> $ raco setup --check-pkg-deps try-catch
> [...lots of stuff, no problems reported]
>
> Okay, whatever.
>
> $ raco pkg remove --force try-catch
>
> Turn off the WiFi to be certain I don't get the package server version.
>
> $ raco pkg install ./try-catch
>
> Succeeds, claims that it is building the documentation, does not actually
> do so.  Ditto when I try
>
> $ raco setup try-catch
>
> When I manually run
>
> $ cd try-catch/scribblings/ && scribble try-catch.scbl
>
> I get the try-catch.html file as expected but racket/base functions such as
> with-handlers are not properly linked -- i.e. they appear in blue with a
> red line under them and are not links.

That's normal. Scribble needs a few command-line flags to know where
to look for cross references (xrefs). I don't know the right flags
offhand.


> I do not get any missing dependencies when I run
>
> My info.rkt file and try-catch.scrbl are both based on those from other
> modules I have that do work correctly.  I've checked the issues that were
> pointed out to me the last time I had to ask this question, I've been
> through the Racket documentation and through Beautiful Racket, and still
> not found the answer.  Any suggestions?
>
>
> ;; The info.rkt file
> #lang info
>
> (define collection "try-catch")
> (define version "0.1")
> (define deps '("base"
>                "syntax-classes-lib"))
>
> (define scribblings '(("scribblings/try-catch.scrbl" ())))
>
> (define test-omit-paths '())
> (define build-deps '("racket-doc"
>                      "scribble-lib"
>                      "rackunit-lib"
>                      "sandbox-lib"))
>
> ;;----------
> ;;  The top lines from main.rkt to show the require:
>
> #lang racket/base
>
> (require (for-syntax racket/base
>                      syntax/parse)
>          racket/function)
>
> ;;----------
> ;; A stripped-down version of scribblings/try-catch.scrbl that demonstrates
> the failures
>
> #lang scribble/manual
>
> @(require (for-label racket)
>           racket/sandbox
>           scribble/example)
>
> @defmodule[try-catch]
>
> @(define eval
>    (call-with-trusted-sandbox-configuration
>     (lambda ()
>       (parameterize ([sandbox-output 'string]
>                      [sandbox-error-output 'string]
>                      [sandbox-memory-limit 50])
> (make-evaluator 'racket)))))
>
> @itemlist[
> @item{@racket[with-handlers], @racket[~a], @racketmodname[syntax-parse]}
> ]
>
> @examples[
>           #:eval eval
>           #:label #f
>
>     (require try-catch)
>     (define err (defatalize (raise-arguments-error 'foo "failed")))
>     err
>     (try [(displayln "ok")])
> ]
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAE8gKoforSuxKVGwj2E_T-_HhLafaFipRGqERh6QUvyn6%2B9MUg%40mail.gmail.com.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R5%2B%3DbdPTXwrNgu1ZKfjzRSOYy03FmMAiRN%2Br2o3DEyoUA%40mail.gmail.com.
> git clone https://github.com/dstorrs/try-catch
Cloning into 'try-catch'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 18 (delta 4), reused 18 (delta 4), pack-reused 0
Unpacking objects: 100% (18/18), done.
> cd try-catch
> ls
LICENSE         info.rkt        main.rkt        scribblings
> raco pkg install
Linking current directory as a package
The following uninstalled packages are listed as dependencies of try-catch:
   test-more
Would you like to install these dependencies? [Y/n/a/c/?] y
Resolving "test-more" via https://pkgs.racket-lang.org
Downloading repository https://github.com/dstorrs/racket-test-more.git
The following uninstalled packages were listed as dependencies
and they were installed:
 dependencies of try-catch:
   test-more
raco setup: version: 7.8.0.6
raco setup: platform: x86_64-macosx [3m]
raco setup: target machine: racket
raco setup: installation name: development
raco setup: variants: 3m
raco setup: main collects: /Users/ben/code/racket/fork/racket/collects
raco setup: collects paths: 
raco setup:   /Users/ben/code/racket/fork/racket/collects
raco setup: main pkgs: /Users/ben/code/racket/fork/racket/share/pkgs
raco setup: pkgs paths: 
raco setup:   /Users/ben/code/racket/fork/racket/share/pkgs
raco setup:   /Users/ben/Library/Racket/development/pkgs
raco setup: links files: 
raco setup:   /Users/ben/code/racket/fork/racket/share/links.rktd
raco setup:   /Users/ben/Library/Racket/development/links.rktd
raco setup: main docs: /Users/ben/code/racket/fork/racket/doc
raco setup: --- updating info-domain tables ---                    [13:36:02]
raco setup: updating: /Users/ben/code/racket/fork/racket/share/info-cache.rktd
raco setup: --- pre-installing collections ---                     [13:36:02]
raco setup: --- installing foreign libraries ---                   [13:36:02]
raco setup: --- installing shared files ---                        [13:36:02]
raco setup: --- compiling collections ---                          [13:36:02]
raco setup: --- parallel build using 4 jobs ---                    [13:36:02]
raco setup: 3 making: <pkgs>/racket-index/scribblings/main
raco setup: 2 making: <pkgs>/test-more
raco setup: 1 making: <pkgs>/try-catch
raco setup: 1 making: <pkgs>/try-catch/scribblings
raco setup: 2 making: <pkgs>/test-more/tests
raco setup: 3 making: <pkgs>/racket-index/scribblings/main/private
raco setup: 3 making: <pkgs>/racket-index/scribblings/main/user
raco setup: --- creating launchers ---                             [13:36:06]
raco setup: --- installing man pages ---                           [13:36:06]
raco setup: --- building documentation ---                         [13:36:06]
raco setup: 2 skipping: <pkgs>/mischief/mischief/scribblings/mischief.scrbl
raco setup: 1 skipping: 
<pkgs>/social-contract/contract/social/scribblings/social-contract.scrbl
raco setup: 2 running: <pkgs>/try-catch/scribblings/try-catch.scrbl
raco setup: 1 skipping: <pkgs>/typed-compose/typed-compose.scrbl
raco setup: 3 rendering: <pkgs>/racket-index/scribblings/main/release.scrbl
raco setup: 2 rendering: <pkgs>/racket-index/scribblings/main/start.scrbl
raco setup: 1 rendering: <pkgs>/try-catch/scribblings/try-catch.scrbl
raco setup: 0 rendering: 
<pkgs>/racket-index/scribblings/main/local-redirect.scrbl
raco setup: 3 rendering: <pkgs>/racket-index/scribblings/main/search.scrbl
raco setup: --- installing collections ---                         [13:36:37]
raco setup: --- post-installing collections ---                    [13:36:37]
> vi info.rkt
> vi scribblings/try-catch.scrbl

zsh: suspended  nvim scribblings/try-catch.scrbl
> raco setup try-catch
raco setup: version: 7.8.0.6
raco setup: platform: x86_64-macosx [3m]
raco setup: target machine: racket
raco setup: installation name: development
raco setup: variants: 3m
raco setup: main collects: /Users/ben/code/racket/fork/racket/collects
raco setup: collects paths: 
raco setup:   /Users/ben/Library/Racket/development/collects
raco setup:   /Users/ben/code/racket/fork/racket/collects
raco setup: main pkgs: /Users/ben/code/racket/fork/racket/share/pkgs
raco setup: pkgs paths: 
raco setup:   /Users/ben/code/racket/fork/racket/share/pkgs
raco setup:   /Users/ben/Library/Racket/development/pkgs
raco setup: links files: 
raco setup:   /Users/ben/code/racket/fork/racket/share/links.rktd
raco setup:   /Users/ben/Library/Racket/development/links.rktd
raco setup: main docs: /Users/ben/code/racket/fork/racket/doc
raco setup: --- updating info-domain tables ---                    [13:44:41]
raco setup: --- pre-installing collections ---                     [13:44:41]
raco setup: --- installing foreign libraries ---                   [13:44:41]
raco setup: --- installing shared files ---                        [13:44:41]
raco setup: --- compiling collections ---                          [13:44:41]
raco setup: --- parallel build using 4 jobs ---                    [13:44:41]
raco setup: 3 making: <pkgs>/try-catch
raco setup: 3 making: <pkgs>/try-catch/scribblings
raco setup: --- creating launchers ---                             [13:44:43]
raco setup: --- installing man pages ---                           [13:44:43]
raco setup: --- building documentation ---                         [13:44:43]
raco setup: 2 skipping: <pkgs>/mischief/mischief/scribblings/mischief.scrbl
raco setup: 3 skipping: 
<pkgs>/social-contract/contract/social/scribblings/social-contract.scrbl
raco setup: 2 running: <pkgs>/try-catch/scribblings/try-catch.scrbl
raco setup: 1 skipping: <pkgs>/typed-compose/typed-compose.scrbl
raco setup: rendering: <pkgs>/try-catch/scribblings/try-catch.scrbl
raco setup: --- installing collections ---                         [13:45:00]
raco setup: --- post-installing collections ---                    [13:45:00]

Reply via email to