Skip to content

Lua51 crates must support luajit or they fail to build on systems with luajit #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
benlubas opened this issue Feb 7, 2025 · 0 comments

Comments

@benlubas
Copy link

benlubas commented Feb 7, 2025

This is the subject of this issue: 961c204#diff-a685eed9ba3d4ea4eb31537f25d60bfff810bcb666f860d88268394655393522L27-R32

I'm not sure if this is a bug or maybe just weird undocumented behavior. I have a rock that uses this backend neorg-query, it only had the lua51 feature (missing the luajit feature for no reason other than I was lazy and didn't add it). I had a user who was unable to install with an error:

error: the package 'neorg_query' does not contain this feature: luajit
help: there is a similarly named feature: lua51

My understanding is that he has luajit installed, so the build script sees "we're using lua51", then searches the user's system for luajit, finds it, and adds the luajit feature, which is then used in the build command, even if there is no luajit feature flag on my crate.

There's an easy workaround here, I just added the luajit feature flag, and default_features = false and things work now.

I also don't really know if there's a good way to change the logic, maybe the best solution is a way for the user to specify the lua version feature flag in the build config or something to skip the part that guesses 5.1 vs jit. Maybe the answer is "there's no reason to ever support just lua51 and not jit, so just have both"

Anyway, I'm more just curious about the behavior than expecting it to change. Thank for the awesome work on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant