Report offending file for invalid require
Open
Nobody has claimed this yet.
feature request
- Dominant language
- Racket
- Stars
- 5.2k
- Forks
- 698
- Avg merge
- 18h 34m
- Merged PRs (30d)
- 5
Description
It's always been a surprise to me that Racket only says that it couldn't require X, but doesn't say where X is required, making it difficult to find the problem and fix it.
E.g.,
;; a.rkt
#lang racket
(require "b.rkt")
;; b.rkt
#lang racket
(require "c.rkt")
(c.rkt doesn't exist)
Running a.rkt, I get:
../../Applications/Racket v7.3/share/pkgs/gui-lib/mred/private/snipfile.rkt:324:2: open-input-file: cannot open module file
module path: c.rkt
path: c.rkt
system error: no such file or directory; rktio_err=3
no package suggestions are available .
I expect that b.rkt shows up in the error message so that users know that it should be fixed there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the a.rkt, b.rkt, and missing c.rkt example, then inspect the reported error path at snipfile.rkt:324. Trace how the require of c.rkt is reported when it originates in b.rkt; done means the error identifies b.rkt as the offending requiring file.
Written by the indexing model from the issue text.
Assessment
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100