racket / racket/scribble

Confusing (possibly broken?) documentation of for-label requires

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

Nobody has claimed this yet.

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

Description

When documenting a module in a package, I get different behavior depending on whether I import the module with (for-label "mod.rkt") or with (for-label collect/mod). In particular, in the first case, many of the hyperlinks in the generated html are missing and underlined in red. It works as expected when using the second require. This is misleading because the examples in the documentation (how-to.scrbl) requires modules for-label as path strings.

Example in a package 'scrib_test':

File doc.scrbl

#lang scribble/manual

@(require (for-label racket
            "mod.rkt"))

@defmodule[scrib_test/mod]

@defproc[(some-fun [x any/c])
         string?]{fun}

File mod.rkt

#lang racket

(provide some-fun)

(define (some-fun x)
  "fun")

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

Start with the for-label examples in how-to.scrbl and reproduce the scrib_test case using doc.scrbl and mod.rkt. Compare generated HTML for the path-string and collection requires, then trace the documentation behavior involved. Done means both forms produce the expected hyperlinks without red underlining.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.