glsp icon indicating copy to clipboard operation
glsp copied to clipboard

Compilation not working with (require) but working with (load)

Open scambier opened this issue 4 years ago • 0 comments

Hello, I'm having issues when I try to compile!() my GameLisp code. The compilation is fine, but once I execute the resulting binary, there's the following error:

unhandled error in run() call:

stack trace:
    glsp::load_compiled()
    (load) at compile-proc-macro:1
    glsp::load("./game/main.glsp")
    (require) at ./game/main.glsp:1
    glsp::require("game/structs.glsp")

errors:
    invalid filename 'game/structs.glsp' passed to glsp::require
    The specified path cannot be found. (os error 3)
thread 'main' panicked at 'global type roguelike_glsp::api::KeyPressed was never registered, or it has been dropped', [redacted]\.cargo\registry\src\github.com-1ecc6299db9ec823\glsp-engine-0.2.0\src\engine.rs:2595:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I solved this problem by replacing all the (require) calls with (load) so it's not really an issue right now, but it seemed cleaner to call (require).

My repository is here

(also, any critic on my rust/glsp code is welcome)

Thank you

scambier avatar Jul 05 '21 16:07 scambier