racket / racket/racket

Errortrace breaks in non-Racket REPL

Open
#5,174 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
5.2k
Forks
698
Avg merge
18h 34m
Merged PRs (30d)
5

Description

What version of Racket are you using?
e.g., v8.15

What program did you run?
Please include a short example that triggers the bug

Let test.scrbl be an empty Scribble file:

#lang scribble/base
;; EOF

It does not work with errortrace in REPL:

$ racket
Welcome to Racket v8.15.0.12 [cs].
> (require errortrace)
> (enter! "test.scrbl")
<pkgs>/errortrace-lib/errortrace/private/utils.rkt:34:14: begin: unbound identifier;
 also, no #%app syntax transformer is bound
  at: begin
  in: (begin (#%require (for-meta 1 errortrace/errortrace-key)) (#%require (for-meta 0 errortrace/errortrace-key)))
 [,bt for context]

What should have happened?

The program loads just like the case without errortrace:

Welcome to Racket v8.15.0.12 [cs].
> (enter! "test.scrbl")
"test.scrbl"> title
#<procedure:title>
"test.scrbl"> section
#<procedure:section>
"test.scrbl"> 1234
1234
"test.scrbl"> (+ 5 3)

If you got an error message, please include it here.

<pkgs>/errortrace-lib/errortrace/private/utils.rkt:34:14: begin: unbound identifier;
 also, no #%app syntax transformer is bound
  at: begin
  in: (begin (#%require (for-meta 1 errortrace/errortrace-key)) (#%require (for-meta 0 errortrace/errortrace-key)))
 [,bt for context]

Contributor guide

Open the contributing guide

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 failure with an empty test.scrbl, the Racket REPL, (require errortrace), and (enter! "test.scrbl"). Start at errortrace/private/utils.rkt:34:14 and compare this path with loading the same file without errortrace. Done means errortrace no longer reports the unbound begin and the REPL exposes the Scribble bindings and expressions shown in the report.

Written by the indexing model from the issue text.

Assessment

Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.