Skip to content

Fix CI LuaRocks module paths - #7

Merged
Raezil merged 4 commits into
mainfrom
codex/fix-ci-luarocks-path
Aug 29, 2026
Merged

Fix CI LuaRocks module paths#7
Raezil merged 4 commits into
mainfrom
codex/fix-ci-luarocks-path

Conversation

@Raezil

@Raezil Raezil commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary by cubic

Fixes CI so LuaRocks-installed modules are found by the Lua interpreter and makes a missing socket.http error clearer.

  • Installs LuaRocks dependencies into a workspace-local tree and loads that tree's paths before dependency checks and test runs; the Makefile now derives LUA_PATH from the same tree so make targets also see the dependencies.
  • Adds a check for socket.http alongside the existing dkjson and cjson.safe checks, and includes the underlying error when it's missing.

Written for commit c68bc65. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/ci.yml">

<violation number="1" location=".github/workflows/ci.yml:38">
P2: The `eval "$(luarocks path)"` before `make test` has no effect on Lua-rock modules because the Makefile redefines and exports LUA_PATH (`LUA_PATH := ./lua/?.lua;./lua/?/init.lua;;`). Inside make recipes the exported LUA_PATH is the Makefile value, so pure-Lua rock modules such as `dkjson` and the `socket.http` Lua wrapper still are not resolvable during `make test`; only C modules (.so) resolve via LUA_CPATH, which make does not override. Make the rocks path part of the Makefile's LUA_PATH (e.g. append `$(shell luarocks path --lr-path)` in the Makefile) instead of relying on the shell eval, which the Makefile overrides.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/ci.yml Outdated
- name: Verify JSON dependencies
- name: Verify dependencies
run: |
eval "$(luarocks path)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The eval "$(luarocks path)" before make test has no effect on Lua-rock modules because the Makefile redefines and exports LUA_PATH (LUA_PATH := ./lua/?.lua;./lua/?/init.lua;;). Inside make recipes the exported LUA_PATH is the Makefile value, so pure-Lua rock modules such as dkjson and the socket.http Lua wrapper still are not resolvable during make test; only C modules (.so) resolve via LUA_CPATH, which make does not override. Make the rocks path part of the Makefile's LUA_PATH (e.g. append $(shell luarocks path --lr-path) in the Makefile) instead of relying on the shell eval, which the Makefile overrides.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 38:

<comment>The `eval "$(luarocks path)"` before `make test` has no effect on Lua-rock modules because the Makefile redefines and exports LUA_PATH (`LUA_PATH := ./lua/?.lua;./lua/?/init.lua;;`). Inside make recipes the exported LUA_PATH is the Makefile value, so pure-Lua rock modules such as `dkjson` and the `socket.http` Lua wrapper still are not resolvable during `make test`; only C modules (.so) resolve via LUA_CPATH, which make does not override. Make the rocks path part of the Makefile's LUA_PATH (e.g. append `$(shell luarocks path --lr-path)` in the Makefile) instead of relying on the shell eval, which the Makefile overrides.</comment>

<file context>
@@ -33,12 +33,15 @@ jobs:
-      - name: Verify JSON dependencies
+      - name: Verify dependencies
         run: |
+          eval "$(luarocks path)"
+          lua -e "assert(require('socket.http'))"
           lua -e "assert(require('dkjson'))"
</file context>

@Raezil
Raezil merged commit c5417af into main Aug 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant