Omikhleia / silex.sile

Extension layer for SILE and resilient
MIT License
6 stars 1 forks source link

Lua 5.1 minimum compatibility #7

Closed Omikhleia closed 7 months ago

Omikhleia commented 8 months ago

See https://github.com/Omikhleia/resilient.sile/pull/70

silex/fixes.lua:174:23: accessing undefined field searchpath of global package

IIRC, that line was copied from SILE.

alerque commented 8 months ago

We appear to be running luacheck wrong upstream in SILE because we have std = "max" instead of std = "min". I'll look into that now and it may be that since we're loading compat patches we can actually use "max", but we should clarify that. I'll look into it.

alerque commented 8 months ago

See Omikhleia/resilient.sile#70

silex/fixes.lua:174:23: accessing undefined field searchpath of global package

IIRC, that line was copied from SILE.

This lint can be ignored. We were not throwing it on SILE because we were configured correctly, but we are also loading a compat library that adds some Lua 5.3 stuff into Lua 5.1, and this searchpath is one of them.

I'm trying to figure out how to best configure luacheck now.

alerque commented 8 months ago

I just fixed this in luacheck so that --std min+sile should now allow the use of package.searchpath() since we patch it into Lua 5.1. It will be in a new version of LuaCheck shortly.

alerque commented 8 months ago

Simply re-running CI should fix this now since the GihHub Action has been updated.