massung / r-cade

Retro Game Engine for Racket
https://r-cade.io
Other
273 stars 13 forks source link

ffi-lib: contract violation #1

Closed johnjelinek closed 4 years ago

johnjelinek commented 4 years ago

I can't get r-cade required.

$ racket

Welcome to Racket v7.5.
> (require r-cade)
; ffi-lib: contract violation
;   expected: (or/c string? path?)
;   given: #<void>
; [,bt for context]
johnjelinek commented 4 years ago

similarly:

$ ./tetris

ffi-lib: contract violation
  expected: (or/c string? path?)
  given: #<void>
  context...:
   '#%embedded:csfml/audio:: [running body]
   temp37_0
   for-loop
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   perform-require!78
   top-level: [running body]
   eval-one-top12
   ...
jgreco commented 4 years ago

It this on MacOS? If so, I think it's probably a bug in racket-csfml bindings: https://github.com/massung/racket-csfml/pull/1

johnjelinek commented 4 years ago
> (system-type 'os)
'macosx
massung commented 4 years ago

Merged massung/racket-csfml#1 which should take care of this. Thanks!

johnjelinek commented 4 years ago

How do I get the updated package?

$ raco pkg update r-cade

Resolving "r-cade" via https://download.racket-lang.org/releases/7.5/catalog/
Resolving "r-cade" via https://pkgs.racket-lang.org
No updates available
massung commented 4 years ago

r-cade hasn't been updated. The csfml library has. Try:

$ raco pkg update csfml

and see if that works for you?

Note: these are my first published packages for Racket, so it's quite possible I could be doing something a bit better on that front. :)