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

Move openresty-specific language extensions under a special configuration? #63

Open
siddhesh opened this issue Jul 2, 2019 · 7 comments

Comments

@siddhesh
Copy link
Collaborator

siddhesh commented Jul 2, 2019

I was thinking of ways to incorporate the openresty-specific language extensions such as thread.exdata and the various table.* functions and it seems to me that the best way would be to put it under a conditional build flag (-DOPENRESTY_EXTENSIONS or similar). This would be set by default in luajit2 and disabled by default in my fork.

Does that sound like a reasonable approach? If yes then I'll first post patches to put the bits under conditional macros and then incorporate these features into my fork.

@agentzh
Copy link
Member

agentzh commented Jul 2, 2019

@siddhesh I'm fine with that though I think LJ_OR_EXT is a better name (shorter and more informative). And yes, LJ_OR_EXT should be enabled by default in this repo.

@agentzh
Copy link
Member

agentzh commented Jul 2, 2019

We may also need to adapt the openresty/luajit2-test-suite repo to support both modes similar to the existing LUA52 mode.

@agentzh
Copy link
Member

agentzh commented Jul 2, 2019

Pull requests welcome!

@XVilka
Copy link

XVilka commented Jan 15, 2020

Just an update - was done by @siddhesh in MoonJIT 2.2.0 - see "OpenResty Extensions" section in the release notes https://github.com/moonjit/moonjit/releases/tag/2.2.0

@siddhesh
Copy link
Collaborator Author

Yeah those are only a subset of the extensions that I thought were safe enough (i.e. won't collide with the namespace of future lua features) to incorporate without the flag. There are many more that need to go in under the special configuration. I just haven't found time to do that.

@agentzh
Copy link
Member

agentzh commented Jan 16, 2020

Yes, we can go with the OPENRESTY_EXT macro (shorter) :)

@agentzh
Copy link
Member

agentzh commented Jan 16, 2020

Ah it seems like I proposed an even better name: LJ_OR_EXT :)

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

3 participants