Skip to content

go-luarocks: native rock pipeline - #1377

Open
bigbes wants to merge 4 commits into
v3from
bigbes/tntp-9959-go-luarocks-native
Open

bigbes wants to merge 4 commits into
v3from
bigbes/tntp-9959-go-luarocks-native

Conversation

@bigbes

@bigbes bigbes commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Bumps github.com/tarantool/go-luarocks and moves the tt package dependency pipeline onto the library's pure-Go engine.

  • Ordered index. cli/manifest/rocks drops its own orderedIndex / httpIndexes in favour of remote.NewIndexes + remote.NewOrderedIndex, which have the same first-found-wins semantics. The library dispatches each server entry on its form, so a filesystem path or a file:// URL is read off disk — a directory holding a LuaRocks manifest is now a rock server anywhere a URL is, including a dependency's registry key.
  • Native backend. Registry installs, search and download run on the pure-Go engine; the Lua interpreter is no longer started for a build, fetch or resolve. tt rocks stays on the Lua backend — only that one can run the full LuaRocks command line.
  • LUA_BINDIR. The bump carries the fix that derives LUA_BINDIR from the Tarantool executable, with <prefix>/bin only as a fallback. That is what a flat SDK layout needs, and there is now a test for it.

Related to TNTP-9960

The new pin carries the native search and download engines, the
local-directory rock index (remote.FileRemoteIndex, NewIndexes,
OrderedIndex) and the LUA_BINDIR derivation from the Tarantool
executable. It is the head of the library's master, so it also brings
the lua-state isolation between dispatches and the per-dispatch
re-evaluation of luarocks.cmd that landed after the engines.

The library requires go-git v5.19.2 and newer golang.org/x modules,
so those move with it.

Related to TNTP-9960
The in-tree orderedIndex and httpIndexes duplicated what the library
now ships as remote.NewIndexes plus remote.NewOrderedIndex, with the
same first-found-wins semantics.

Dropping the copy also picks up the dispatch by server form, so a
server entry that names a directory or a file:// URL is read off
disk. A directory holding a `manifest` is therefore a rock server
anywhere a URL is, including a per-dependency registry override.

An empty server list is now an error rather than a silent "rock not
found", which is what the library's OrderedIndex reports.

Related to TNTP-9960
The registry install path now uses the pure-Go engine, as the path
dependencies already did, and so do the search and download wrappers.
The Lua interpreter is no longer started for a build, a fetch or a
resolve.

tt rocks keeps the Lua engine: only that backend can run the full
LuaRocks command line, which is what the command exposes.

Cover the LUA_BINDIR derivation while here: a flat SDK layout, where
the binary sits at the prefix root rather than under bin/, must take
the directory of the executable.

Related to TNTP-9960
The mock aeon server replaces github.com/tarantool/tt with the
checkout, so it inherits the root module's go directive. Without the
bump a readonly build refuses: "updates to go.mod needed".

Related to TNTP-9960
@bigbes
bigbes force-pushed the bigbes/tntp-9959-go-luarocks-native branch from 633d475 to 810a1dd Compare September 16, 2026 15:37
@bigbes

bigbes commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

Diffs per group of changes, rendered on diffshub:

Whole PR: https://diffshub.com/tarantool/tt/pull/1377

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