aboutsummaryrefslogtreecommitdiff
path: root/vendor/dkjson.d.tl
diff options
context:
space:
mode:
authortobil4sk <tobil4sk@outlook.com>2026-02-03 22:47:50 +0000
committerGitHub <noreply@github.com>2026-02-03 19:47:50 -0300
commit47301d83aba58925e1b9594023621ebb27070cdb (patch)
tree73021b5366687ec1683b9e66505e74f22f71d31b /vendor/dkjson.d.tl
parentacf1f47e7f1b1ecbc147e41cae51ddfd06ad898d (diff)
downloadluarocks-main.tar.gz
luarocks-main.tar.bz2
luarocks-main.zip
Improve flexibility around vendored librariesmain
compat53 is vendored since #1757 as it is required to run luarocks with lua 5.1 or 5.2. However, this introduced some issues as the GNUmakefile install rule places these in the same place where `luarocks install compat53` would install them. This means you get conflicts if you install the actual package: ``` Warning: /.../prefix/share/lua/5.1/compat53/init.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/init.lua~ Warning: /.../prefix/share/lua/5.1/compat53/module.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/module.lua~ Warning: /.../prefix/share/lua/5.1/compat53/file_mt.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/file_mt.lua~ ``` It is also not ideal for linux package maintainers to include a vendored package, see: https://github.com/luarocks/luarocks/pull/1757#issuecomment-3409873412. To solve these issues, this patchset makes the following changes: - GNUmakefile now places the compat53 files under `luarocks/vendor/compat53` (which is added internally to the luarocks script's `package.path`). This way a user's installation of compat53 does not interfere at all with luarocks one. - Added `--with-system-compat53` option to configure script for external packaging systems. - Fixed install.bat's logic for deciding whether to vendor compat53, as the current script includes it for every version. install.bat already places luarocks sources outside of LUAPATH, so that part can stay as is. I've also inverted the version check to avoid the need for future patches like: #1850.
Diffstat (limited to 'vendor/dkjson.d.tl')
-rw-r--r--vendor/dkjson.d.tl33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/dkjson.d.tl b/vendor/dkjson.d.tl
new file mode 100644
index 00000000..4245e8aa
--- /dev/null
+++ b/vendor/dkjson.d.tl
@@ -0,0 +1,33 @@
1
2--[[
3- local type json = {string:json}
4]]
5
6local record dkjson
7 record JsonState
8 indent: boolean
9 keyorder: {string}
10 level: number
11 buffer: {string}
12 bufferlen: number
13 tables: {table:boolean}
14 exception: function(string, string, string, string): boolean|string, string
15 end
16 encode: function({string:any}, ?JsonState): string
17
18 decode: function(string, ?number, ?any, ?table): {string:any}, integer, string
19
20 null: table
21
22 version: string
23
24 quotestring: function(string): string
25
26 addnewline: function(JsonState)
27
28 encodeexception: function(string, any, JsonState, string): string
29
30 use_lpeg: function(): dkjson
31end
32
33return dkjson