requiring a file on windows

17 views
Skip to first unread message

thro...@gmail.com

unread,
Feb 2, 2021, 6:20:30 PM2/2/21
to Racket Users
I can't seem to build paths the way require wants them on windows.

I must be missing something basic.

Tried a bunch of things (can't remember them all), here's the last:
(Racket versions  8.0.0.4--2021-02-01 and 7.8)

(define wrk_dir #"C:/Temporary/zDEL3/TEST_BATCH/")
(require(file(bytes->string/utf-8(bytes-append wrk_dir #"vend_map.rkt"))))



. file: ill-formed module path in: (file (bytes->string/utf-8 (bytes-append wrk_dir #"vend_map.rkt")))
>

John Clements

unread,
Feb 2, 2021, 6:40:45 PM2/2/21
to thro...@gmail.com, Racket Users
In order to allow static compilation, the path in a (file …) require must be a literal string.

It sounds like you might be looking for “dynamic-require” ?

Apologies if I’m misunderstanding you.

John Clements
> --
> 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/92dea514-f8f7-49f2-bf5a-1799430cd4bfn%40googlegroups.com.

thro...@gmail.com

unread,
Feb 3, 2021, 6:28:40 AM2/3/21
to Racket Users
Thanks John.

I somehow mis-remembered  that  this had worked on Linux before
and became convinced there was a windows issue.

sigh ... my memory errors got  the best of me again.
Reply all
Reply to author
Forward
0 new messages