Bug#872599: lua-cjson: no lua5.3 package

2018-12-22 Thread Rob Oosterling

Hi, I'm running into the same issue.

Is there a way to resolve this?

Many thanks!



Bug#872599: lua-cjson: no lua5.3 package

2018-02-26 Thread Johannes Schauer
Hi,

On Sat, 19 Aug 2017 04:55:23 + daurnimator  wrote:
> The lua-cjson package is missing a lua 5.3 version (it only contains 5.1 and
> 5.2)

I was working on implementing this. It needs a new symlink to
lua5.1.dh-lua.conf from debian/lua5.3.dh-lua.conf for dh-lua and some
adjustments for lua 5.3.

For example, at the top of lua/cjson/util.lua add:

local unpack = unpack or table.unpack

Because unpack was moved to table.unpack. This way it's compatible with lua
5.1, 5.2 and 5.3.

Unfortunately, some testcases fail with lua 5.3 (see the end of this message)
but unfortunately this is the first time I'm touching Lua, so I'm unable to fix
these problems.

Thanks!

cheers, josch




==> Test [91] Set encode_number_precision(0) [throw error]: FAIL
[Input] { 0 }
[Expected:error] { "bad argument #1 to '?' (expected integer between 1 and 14)" 
}
[Received:error] { "bad argument #1 to 'cjson.encode_number_precision' 
(expected integer between 1 and 14)" }

==> Test [92] Set encode_number_precision("five") [throw error]: FAIL
[Input] { "five" }
[Expected:error] { "bad argument #1 to '?' (number expected, got string)" }
[Received:error] { "bad argument #1 to 'cjson.encode_number_precision' (number 
expected, got string)" }

==> Test [93] Set encode_keep_buffer(nil, true) [throw error]: FAIL
[Input] { nil, true }
[Expected:error] { "bad argument #2 to '?' (found too many arguments)" }
[Received:error] { "bad argument #2 to 'cjson.encode_keep_buffer' (found too 
many arguments)" }

==> Test [94] Set encode_max_depth("wrong") [throw error]: FAIL
[Input] { "wrong" }
[Expected:error] { "bad argument #1 to '?' (number expected, got string)" }
[Received:error] { "bad argument #1 to 'cjson.encode_max_depth' (number 
expected, got string)" }

==> Test [95] Set decode_max_depth(0) [throw error]: FAIL
[Input] { "0" }
[Expected:error] { "bad argument #1 to '?' (expected integer between 1 and 
2147483647)" }
[Received:error] { "bad argument #1 to 'cjson.decode_max_depth' (expected 
integer between 1 and 2147483647)" }

==> Test [96] Set encode_invalid_numbers(-2) [throw error]: FAIL
[Input] { -2 }
[Expected:error] { "bad argument #1 to '?' (invalid option '-2')" }
[Received:error] { "bad argument #1 to 'cjson.encode_invalid_numbers' (invalid 
option '-2')" }

==> Test [97] Set decode_invalid_numbers(true, false) [throw error]: FAIL
[Input] { true, false }
[Expected:error] { "bad argument #2 to '?' (found too many arguments)" }
[Received:error] { "bad argument #2 to 'cjson.decode_invalid_numbers' (found 
too many arguments)" }

==> Test [98] Set encode_sparse_array("not quite on") [throw error]: FAIL
[Input] { "not quite on" }
[Expected:error] { "bad argument #1 to '?' (invalid option 'not quite on')" }
[Received:error] { "bad argument #1 to 'cjson.encode_sparse_array' (invalid 
option 'not quite on')" }

==> Test [101] Encode (safe) argument validation [throw error]: FAIL
[Input] { "arg1", "arg2" }
[Expected:error] { "bad argument #1 to '?' (expected 1 argument)" }
[Received:error] { "bad argument #1 to 'cjson.safe.encode' (expected 1 
argument)" }




signature.asc
Description: signature


Bug#872599: lua-cjson: no lua5.3 package

2017-08-18 Thread daurnimator
Package: lua-cjson
Severity: important

Dear Maintainer,

The lua-cjson package is missing a lua 5.3 version (it only contains 5.1 and 
5.2)

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.12.8-1-ARCH (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C 
(charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages lua-cjson depends on:
ii  libc6  2.24-11+deb9u1
ii  multiarch-support  2.24-11+deb9u1

lua-cjson recommends no packages.

lua-cjson suggests no packages.