-
Notifications
You must be signed in to change notification settings - Fork 636
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
WIP: Build without Lua scripting via USE_LUA (#1204) #1245
base: unstable
Are you sure you want to change the base?
Conversation
I see the Test Tags system now and am using that to constrain tests which utilize Lua. |
This sounds right to me.
Test tag sounds like the best solution. Is it feasible? (If not, maybe we can just run a few selected test suites in the CI for the build without Lua.) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1245 +/- ##
============================================
- Coverage 70.70% 70.66% -0.05%
============================================
Files 114 114
Lines 63157 63159 +2
============================================
- Hits 44654 44629 -25
- Misses 18503 18530 +27
|
Although I perhaps wanted It passes tests with both See this commit for the tag changes. |
I guess |
I hadn't re-run Lua-enabled after fixing some Lua-disabled tests.... this last commit corrects that with the proper empty results. |
The expression `dictSize(evalScriptsDict())` is used a couple times for memory reporting. `dictSize` is a macro without NULL checking and used within a `FMTARG` macro in `server.c`. Overall, this makes it challenging to stub out when building without the Lua engine. This change lifts that expression up to its own function `evalScriptsDictSize`. Signed-off-by: Evan Wies <[email protected]>
Adds the ability to disable Lua scripting using the build conifguration `USE_LUA`. This will prevent the building of the Lua static library and will keep Lua and most Lua scripting internals out of the build. This approach strived to minimize the change surface, stubbing out keys requried functions and otherwise `ifdef`ing out large swathes of code. The base Lua scripting commands like `EVAL` remain intact, but reply with an error message `Lua scripting disabled`. `INFO` commands still include scripting statistics to prevent breaking any DevOps scripts, etc. Signed-off-by: Evan Wies <[email protected]>
Adds LUA_TEST_FLAGS to Makefile to propagate filtering of scripting tests. Expands "scripting" tag to all uses of Lua. Signed-off-by: Evan Wies <[email protected]>
Signed-off-by: Evan Wies <[email protected]>
Signed-off-by: Evan Wies <[email protected]>
Signed-off-by: Evan Wies <[email protected]>
* fix ci.yml whitespace, from yamlint * fix defrag.c, from -Werror Signed-off-by: Evan Wies <[email protected]>
Sorry for the repeated build failures -- glad the CI catches it :) I was missing some targets and hence some Lua coverage. I still cannot do a full test on Linux with |
Adds the ability to disable Lua scripting using the build
configuration
USE_LUA
. This will prevent the buildingof the Lua static library and will keep Lua and most Lua
scripting internals out of the build.
This approach strived to minimize the change surface, stubbing out
keys requried functions and otherwise
ifdef
ing out large swathes of code.The base Lua scripting commands like
EVAL
remain intact, but replywith an error message
Lua scripting disabled
.INFO
commandsstill include scripting statistics to prevent breaking any DevOps scripts, etc.
There are decisions to make:
What do with
EVAL
commands, etc? Currently, the command still exists but replies with an Error.What to do with testing infrastructure?
EVAL
is sprinkled throughout.grep -or EVAL tests/unit | wc -l ==> 125
. Do we break tests into files withEVAL
and ones without?