racket / racket/scribble

Can't require a submodule in the same chunk with scribble/lp2

Open
#15 1 comment 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

In the code below, the (require 'm) fails. Interestingly, it is possible to require m from a sibbling submodule works, but (require (submod "." m)) doesn't work.

#lang scribble/lp2

@chunk[<*>
       (module m racket
         (define x 1)
         (provide x))
       (require 'm)                 ;; Fails with "require: unknown module" module name: #<resolved-module-path:'m>
       (require (submod "." m))     ;; Fails with "require: unknown module" module name: #<resolved-module-path:(submod 'scribble-lp-tmp-name m)>
       (module other racket
         (require (submod ".." m))) ;; Works.
       ]

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

Reproduce the issue using the provided #lang scribble/lp2 chunk, first comparing the failing (require 'm) and (require (submod "." m)) with the working sibling-submodule require. Trace the scribble/lp2 entry point and module generation behavior. Done means requiring the same-chunk submodule works without the unknown-module error while the existing sibling case remains working.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.