openresty / openresty-devel-utils Goto Github PK
View Code? Open in Web Editor NEWUtilities for nginx module development
Utilities for nginx module development
when I use ngx-build with nginx-1.10, I see errors on missing patches
https://travis-ci.org/chipitsine/replace-filter-nginx-module
however, I still can compile nginx-1.10 with that module using --add-module
I think, if those patches are important, it should fail if I compile nginx with --add-module
and, if it acceptible, so ngx-build should not fail if there's no certain patch
lua-releng output:
test.lua: 0.0.1 (0.0.1)
Checking use of Lua global variables in file test.lua...
op no. line instruction args ; code
Checking line length exceeding 80...
my test.lua file:
local _M = { version = "0.0.1" }
function _M.test()
local l = "local"
g = l
print(l, g)
gg = {}
end
return _M
we can see g and gg are both gobal variables...
Right now the lj-releng
tool will ignore use of Lua global variables with the name matching one of the Lua builtin functions. This will hide those use of global variables on hot Lua code paths, as in
local function foo (msg)
assert(type(msg) == "string")
print(msg)
end
For this minimal Lua program, the lj-releng
would fail to report the use of Lua global variables inside the foo
user function, which are assert
, type
, and print
. The "global-clean" form should be
local type = type
local assert = assert
local print = print
local function foo (msg)
assert(type(msg) == "string")
print(msg)
end
Under the hood, lj-releng
should only filter builtin function names for bytecodes outside any Lua function bodies. This requires lj-releng
to have some knowledge about the specific bytecode sequences used for Lua function prologue and epilogue during the scan.
minimal case
local band = bit.band
lua-releng use 5.1 version luac interperter
lua-releng test.lua
Checking use of Lua global variables in file test.lua...
op no. line instruction args ; code
1 [1] GETGLOBAL 0 -1 ; bit
should we need to ignore this?
I have a folder named lualib
, when cd that folder, I run find . -name '*.lua' | lua-releng -s -e -L
, lua-releng
won't check files in subfolder such as lualib/db/mysql.lua
. I know this because I set some global variables in subfolder on purpose. Am I wrong? Or what's the right way if I want to recursively check all lua files in some folder?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.