Skip to content
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

[Features] Allow running with --features lua52 #54

Open
SuperBo opened this issue Jun 1, 2024 · 2 comments
Open

[Features] Allow running with --features lua52 #54

SuperBo opened this issue Jun 1, 2024 · 2 comments

Comments

@SuperBo
Copy link

SuperBo commented Jun 1, 2024

Hi @JohnnyMorganz, My code is currently use label feature of lua, however it is not enabled by default in release version.

Are there anyway for me to enable features like lua52 when running this action?

Thank you for your great Stylua and this github action.

@SuperBo SuperBo changed the title [Features] Allow running [Features] Allow running with --features lua52 Jun 1, 2024
@JohnnyMorganz
Copy link
Owner

JohnnyMorganz commented Jun 1, 2024

The release version does have lua52 enabled.
What kind of error are you seeing?

You may be experiencing an issue similar to JohnnyMorganz/StyLua#402 where Luau syntax clashes with Lua 5.2 syntax. You can use cargo to build a binary with only lua52 enabled and that should work. Hopefully in the next major release we will have runtime configurable syntax selection.

Unfortunately there is no way right now to use cargo within the stylua action, but doing cargo install stylua --features lua52 and running stylua via normal run steps should be fine

@SuperBo
Copy link
Author

SuperBo commented Jun 1, 2024

@JohnnyMorganz, sorry for not mentioning the error. I met this JohnnyMorganz/StyLua#407.

I managed to use cargo-instal action to install stylua instead.

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

2 participants