Can no longer interactively enter! module from the shell

28 views
Skip to first unread message

Greg Rosenblatt

unread,
Aug 9, 2020, 9:33:46 PM8/9/20
to Racket Users
Given a module defined in example.rkt:
```
#lang racket/base
(provide example)

(displayln "loading example")

(define example 5)
```

I used to be able to enter example.rkt with an interactive session from the shell like this:

> racket -ie '(enter! "example.rkt")'
Welcome to Racket v7.3.
loading example
> example
; example: undefined;
;  cannot reference an identifier before its definition
;   in module: top-level
; [,bt for context]
> ,bt
; example: undefined;
;  cannot reference an identifier before its definition
;   in module: top-level
;   context...:
;    eval-one-top12
;    /Applications/Racket v7.3/share/pkgs/xrepl-lib/xrepl/xrepl.rkt:1477:0
;    /Applications/Racket v7.3/collects/racket/repl.rkt:11:26


The module still seems to be loading, but my interactive session hasn't started in the module context.  Racket 6 used to start my interactive session in the module context.

Was this change in behavior intended?  Is there a new way to achieve what I'm trying to do?

Sam Tobin-Hochstadt

unread,
Aug 10, 2020, 11:09:09 AM8/10/20
to Greg Rosenblatt, Racket Users
This works for me the way you describe:

```
[samth@huor:/tmp cs-snap] r -ie '(enter! "x.rkt")'
Welcome to Racket v7.8.0.7 [cs].
loading example
"x.rkt"> example
5
"x.rkt">
```

Perhaps there was a problem with 7.3 that you're running into? Can you
try with the 7.8 release?

Sam
> --
> 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 racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/bbaf1e21-52e8-4514-9b8c-20db6357fb40o%40googlegroups.com.

Greg Rosenblatt

unread,
Aug 10, 2020, 11:36:36 AM8/10/20
to Racket Users
Thanks, your output helped narrow down the issue.  It looks like the problem is actually with the regular (non-Chez) variant.


When running with Racket v7.8 [cs] I see the same (expected) behavior as you:

> racket -ie '(enter! "example.rkt")'
Welcome to Racket v7.8 [cs].
loading example
"example.rkt"> example
5
"example.rkt">


However, the regular variant of Racket v7.8 still has an issue:

> racket -ie '(enter! "example.rkt")'
Welcome to Racket v7.8.

loading example
> example
; example: undefined;
;  cannot reference an identifier before its definition
;   in module: top-level
; [,bt for context]
> ,bt
; example: undefined;
;  cannot reference an identifier before its definition
;   in module: top-level
;   context...:
;    eval-one-top
;    /Applications/Racket v7.8/share/pkgs/xrepl-lib/xrepl/xrepl.rkt:1493:0
;    /Applications/Racket v7.8/collects/racket/repl.rkt:11:26


On Monday, August 10, 2020 at 11:09:09 AM UTC-4, Sam Tobin-Hochstadt wrote:
This works for me the way you describe:

```
[samth@huor:/tmp cs-snap] r -ie '(enter! "x.rkt")'
Welcome to Racket v7.8.0.7 [cs].
loading example
"x.rkt"> example
5
"x.rkt">
```

Perhaps there was a problem with 7.3 that you're running into? Can you
try with the 7.8 release?

Sam

> To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.

Sam Tobin-Hochstadt

unread,
Aug 10, 2020, 11:45:15 AM8/10/20
to Greg Rosenblatt, Racket Users
I tried a few more versions of Racket, and this broke between 6.12 and
7.0, probably due to the new expander at that time. I'm surprised that
it works on Racket CS, though.

Sam
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/8439126f-f8b8-4a3c-89f2-5973f9932308o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages