[racket] link: module mismatch

From: Anthony Carrico (acarrico at memebeam.org)
Date: Thu Nov 29 01:20:46 EST 2012

I have a test case that works at the command line:

$ racket
Welcome to Racket v5.3.1.
> (require "simple.rkt")
> (scheme_eval '(+ 2 2) (make-base-namespace))
4
>

But fails with raco test:

$ raco test "simple.rkt"
link: module mismatch;
 possibly, bytecode file needs re-compile because dependencies changed
  exporting module: "/usr/share/racket/collects/racket/private/kw.rkt"
  exporting phase level: 0
  internal explanation: variable not provided (directly or indirectly)
  at: #%app
  in: new-app

Here is my version:

$ racket --version
Welcome to Racket v5.3.1.

And here is the test:

$ cat "simple.rkt"
#lang racket
(module+ test (require rackunit))
(require ffi/unsafe)
(define scheme_eval
  (get-ffi-obj "scheme_eval" (ffi-lib #f) (_fun _scheme _scheme ->
_scheme)))
(provide scheme_eval)
(module+ test
  (check = 4 (scheme_eval '(+ 2 2) (make-base-namespace))))

If I change scheme_eval to eval in "check =" there is no failure.

I know, strange example. I just came across the issue while hacking.

-- 
Anthony Carrico

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20121129/f5247332/attachment.sig>

Posted on the users mailing list.