-
Notifications
You must be signed in to change notification settings - Fork 16
Provides more MatchFunc
and code movement for it
#100
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
Conversation
I think all the code with the directive maps should have a |
@ornj @dengsh12 What will be the process to add a new N+ version, say R32, add it to NPlusLatest? I do see see an overlapping list for R30 and R31, I believe specific version lists should include everything up until the version to be able to perform version specific validation? So for R32, create one if needed? |
@dakshinai It will be in later merge. We will provide a generator. If a new N+ version comes just run
The support file for a specific version only includes the directive definitions in the source code of that version. Say the version is R31,
Currently latest version is R32 so just use Feel free to lmk if there're further concerns! |
"lua_code_cache": { | ||
ngxHTTPMainConf | ngxHTTPSrvConf | ngxHTTPLocConf | ngxHTTPLifConf | ngxConfFlag, | ||
}, | ||
"lua_fake_shm": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This directive is not introduced in the Lua docs https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#directives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a directive in /lua-nginx-module/t/data/fake-shm-module/ngx_http_lua_fake_shm_module.c. I guess they want to drop the support after a period so it is undocumented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/openresty/lua-nginx-module/blob/master/src/ngx_http_lua_module.c
we reference to this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these two files are in the lua git repo. And it seems there is still a test case for lua_fake_shm
. The last commit for lua_fake_shm
is 9 years ago. I think this directive is likely an outdated Lua directive(not pretty sure)?
I just run a script and it seems ngx_http_lua_module.c covers all directives except lua_fake_shm
. Currently the generator can rely on it, but I'm afraid they may split ngx_http_lua_module.c
or have some directive elsewhere in the future. What about generate for all directives on lua git repo, then use the lua doc as a filter? I can add it in next MR
Proposed changes
In #97 , we provided a new field
DirectiveSources
inParseOptions
. It is an array ofMatchFunc
to specify the OSS/N+ version, and dynamic modules to include for validation.In this PR, we
MatchFunc
for OSS/N+ version, and dynamic modules, which can be passed toParseOptions .DirectiveSources
.ParseOptions.MatchFuncs
, users should useParseOptions.DirectiveSources
instead.Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentREADME.md
)