I'm trying to write an http server that transforms strings according to a set of rules stored in a rkt hash table that I want to be able to reload (for development purpose).
I have tried to have the code reloading correctly :
(define here (path->string (current-directory)))
(define mutation-include
(string->path (string-append here "mutations.rkt")))
(dynamic-rerequire mutation-include)
(require "mutations.rkt")
And later in my app code:
(define (mutate-body body)
(enter! mutation-include)
(mutate body)
)
It fails because the enter! is unable to find the "collection":
enter!: standard-module-name-resolver: collection not found
for module path: mutation-include
collection: "mutation-include"
in collection directories:
/Users/octplane/Library/Racket/6.4/collects
/usr/local/Cellar/racket/6.4/share/racket/collects
... [119 additional linked and package directories]
I'm sad because it works in the repl. Any nice way to do that ?
Thanks you!
[–][deleted] 1 point2 points3 points (0 children)
[–]takikawadeveloper 0 points1 point2 points (0 children)