From a10c6fd7a8b9ced9ac1fd2ea98ab44394cfae107 Mon Sep 17 00:00:00 2001 From: Derek Miller Date: Sat, 10 Jan 2026 16:52:31 -0600 Subject: [PATCH 1/2] Update Lua paths to include `vendor` directory and Luarocks path for amalg tool --- Makefile | 8 +++++--- run_tests.sh | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index fa7663f..32b2ca1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# Luarocks path for amalg and other tools +LUAROCKS_PATH := $(shell luarocks path --lr-path 2>/dev/null) + # Default target .PHONY: all all: format lint test build @@ -22,12 +25,11 @@ test-matrix-%: test-%: ./run_tests.sh $* - build/amalg.cache: src/bitn/init.lua @echo "Generating amalgamation cache..." @mkdir -p build @if command -v amalg.lua >/dev/null 2>&1; then \ - LUA_PATH="./src/?.lua;./src/?/init.lua;$(LUA_PATH)" lua -lamalg src/bitn/init.lua && mv amalg.cache build || exit 1; \ + LUA_PATH="./?.lua;./?/init.lua;./src/?.lua;./src/?/init.lua;$(LUAROCKS_PATH)" lua -lamalg src/bitn/init.lua && mv amalg.cache build || exit 1; \ echo "Generated amalg.cache"; \ else \ echo "Error: amalg not found."; \ @@ -41,7 +43,7 @@ build/amalg.cache: src/bitn/init.lua build: build/amalg.cache @echo "Building single-file distribution..." @if command -v amalg.lua >/dev/null 2>&1; then \ - LUA_PATH="./src/?.lua;./src/?/init.lua;$(LUA_PATH)" amalg.lua -o build/bitn.lua -C ./build/amalg.cache || exit 1;\ + LUA_PATH="./?.lua;./?/init.lua;./src/?.lua;./src/?/init.lua;$(LUAROCKS_PATH)" amalg.lua -o build/bitn.lua -C ./build/amalg.cache || exit 1;\ echo "Built build/bitn.lua"; \ VERSION=$$(git describe --exact-match --tags 2>/dev/null || echo "dev"); \ if [ "$$VERSION" != "dev" ]; then \ diff --git a/run_tests.sh b/run_tests.sh index 919be84..9a6a0d6 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -42,8 +42,8 @@ echo script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # Add repository root to Lua's package path -# This allows require() to find modules in the src/tests directories -lua_path="$script_dir/?.lua;$script_dir/?/init.lua;$script_dir/src/?.lua;$script_dir/src/?/init.lua;$script_dir/tests/?.lua;$LUA_PATH" +# This allows require() to find modules in the src/vendor directories +lua_path="$script_dir/?.lua;$script_dir/?/init.lua;$script_dir/src/?.lua;$script_dir/src/?/init.lua;$script_dir/vendor/?.lua;$LUA_PATH" # Parse command line arguments to determine which modules to run default_modules=("bit16" "bit32" "bit64") From b12e8bae63ce68a65a401cf9133c7d4e54529731 Mon Sep 17 00:00:00 2001 From: Derek Miller Date: Sat, 10 Jan 2026 18:25:04 -0600 Subject: [PATCH 2/2] Remove .emmyrc.json --- .emmyrc.json | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .emmyrc.json diff --git a/.emmyrc.json b/.emmyrc.json deleted file mode 100644 index c1a24f3..0000000 --- a/.emmyrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json", - "runtime": { - "version": "LuaJIT" - }, - "workspace": { - "userThirdParty": [ - "/Users/demiller/git/lua-addons" - ], - "library": [ - ], - "useGitIgnore": false, - "ignoreDir": [ - ".claude", - ".git", - ".idea", - ".venv", - "build", - "dist", - "node_modules" - ] - }, - "diagnostics": { - "disable": [ - "unnecessary-assert" - ] - } -}