[racket] Marking dependencies on dynamically required modules.

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Wed Mar 20 03:27:34 EDT 2013

It looks like these get turned into collects paths automatically (for
paths in collects dir), and other modules that are required normally
have the complete path already in deps and this is no different. So
cm-accomplice will solve my issue.

On Tue, Mar 19, 2013 at 10:29 PM, Eric Dobson <eric.n.dobson at gmail.com> wrote:
> I have two files a.rkt and b.rkt, a.rkt dynamically requires b.rkt at
> syntax time.
> a.rkt:
> #lang racket
> (require (for-syntax compiler/cm-accomplice))
> (define-syntax (go stx)
>   (dynamic-require "b.rkt" #f)
>   #''success)
> (go)
> b.rkt:
> #lang racket
> (when #f
>   (error 'this-might-break))
> If I compile a.rkt with raco make, and then change b.rkt's #f to #t,
> and run a.rkt it prints success. If I then delete a.rkt's compiled
> version and recompile, it raises the error.
> I want to be able to declare that a.rkt depends on b.rkt.
> It looks like compiler/cm-accomplice was meant to solve this, but it
> requires complete paths, and it seems like that would prevent the
> bytecode from being machine independent. Is this actually a problem,
> or do the paths only affect the .dep files and so distributing
> compiled versions wouldn't be affected?

Posted on the users mailing list.