Skip to content

Commit

Permalink
Drop support for Lua 5.2
Browse files Browse the repository at this point in the history
I realized late that Lua 5.2 doesn't support bitwise operators... I don't
think it's worth my time to be backwards compatible there, so just drop it
entirely.

Signed-off-by: Kyle Evans <[email protected]>
  • Loading branch information
kevans91 committed Jan 25, 2024
1 parent 2abfdf3 commit f7736a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
lua: [5.2, 5.3, 5.4]
lua: [5.3, 5.4]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
Expand All @@ -25,8 +25,6 @@ jobs:
exclude:
- os: ubuntu-20.04
lua: 5.4
- os: macos-latest
lua: 5.2
- os: macos-latest
lua: 5.3
steps:
Expand Down
4 changes: 2 additions & 2 deletions lib/orch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ end

local function include_file(file, alter_path, env)
local f = assert(impl.open(file, alter_path))
local chunk = f:read("*l") -- * for compatibility with Lua 5.2...
local chunk = f:read("l")

if not chunk then
error(file .. " appears to be empty!")
Expand All @@ -412,7 +412,7 @@ local function include_file(file, alter_path, env)
chunk = chunk .. "\n"
end

chunk = chunk .. assert(f:read("*a"))
chunk = chunk .. assert(f:read("a"))
local func = assert(load(chunk, "@" .. file, "t", env))

return execute(func, true)
Expand Down
2 changes: 1 addition & 1 deletion lib/orch_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <lua.h>
#include <lauxlib.h>

/* We only support Lua 5.2+ */
/* We only support Lua 5.3+ */

/* Introduced in Lua 5.4 */
#ifndef luaL_pushfail
Expand Down

0 comments on commit f7736a1

Please sign in to comment.