Skip to content

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

Open
@benlubas

Description

@benlubas

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions