makspll / bevy_mod_scripting

Bevy Scripting Plugin
Apache License 2.0
390 stars 31 forks source link

Luajit feature does not build. Other build issues as well. #95

Closed ConnorBP closed 7 months ago

ConnorBP commented 8 months ago

As title describes, when building with the scripting features + luajit instead of say lua54, the build errors on latest bevy 0.11.4

Another oddity while I'm here, the pinned sub dependency of tealr does not also pin the tealr_derive which gets different versions for the two and confuses cargo. I cannot get this to build for teal because of this.

A third issue, for whatever reason the published crates.io version 0.3 has incompatible sub dependency versions of bevy 0.10 mixed with 0.11, whereas the current fit version does not. A non broken version should probably be pushed.

All together, building this at its current state is kind of a nightmare.

makspll commented 8 months ago

Hi I am just having a look, first of all are you building on an arm64 based mac by any chance? (see https://github.com/makspll/bevy_mod_scripting/issues/70)

I am unable to find the incompatibile bevy versions in the crates.io version, are you sure that's not coming from your dependencies?

I'll pin the tealr_derive version as well for now on main, and finally release a bevy 0.12 compatibile crates io version and then look into upgrading to the newer tealr/mlua versions as alpha versioning was causing issues for quite a while with that crate.

I was able to run cargo build --workspace --features=luajit,lua_script_api and cargo run --example game_of_life_lua --features=lua54,teal,lua_script_api on the main branch, what errors are you seeing?

ConnorBP commented 8 months ago

Hi I am just having a look, first of all are you building on an arm64 based mac by any chance? (see #70)

I am unable to find the incompatibile bevy versions in the crates.io version, are you sure that's not coming from your dependencies?

I'll pin the tealr_derive version as well for now on main, and finally release a bevy 0.12 compatibile crates io version and then look into upgrading to the newer tealr/mlua versions as alpha versioning was causing issues for quite a while with that crate.

I was able to run cargo build --workspace --features=luajit,lua_script_api and cargo run --example game_of_life_lua --features=lua54,teal,lua_script_api on the main branch, what errors are you seeing?

Hello, thanks for the reply :) I am building AMD64 on windows. It started building when I set my version to latest repo, not sure why it wasn't working on crates. The pinned version was most of the issue though. Jit builds now, not sure what changed.

found another build issue with one of the teal examples as well: https://github.com/makspll/bevy_mod_scripting/blob/48d80128be3089bbf5fc8772492638e618cecdcd/examples/lua/documentation_gen.rs#L25 this macro: https://github.com/makspll/bevy_mod_scripting/blob/48d80128be3089bbf5fc8772492638e618cecdcd/bevy_script_api/src/lua/util.rs#L93C22-L93C22 does not play nice with the re-exported version of bevy_mod_scripting_lua bevy_mod_scripting::lua when trying the example code outside of the example repo.