Skip to content
Snippets Groups Projects
Commit 43274526 authored by Alexander Turenko's avatar Alexander Turenko Committed by Igor Munkin
Browse files

lua: extract lua loaders code into its own file

This commit continues the series of preliminary commits for implementing
the built-in module overriding (so called dual-life modules, see #7774
for the problem statement).

The core idea of the future functionality is that if there is the
`override.foo` module on the filesystem, it automatically replaces the
built-in module `foo`.

This machinery will be implemented as an extra [loader][1], so it'll
work only after loading of the loaders. In turn, it means that we need
to load the loaders as early as possible to allow to replace all (or at
least most of) the built-in modules.

Tarantool loads built-in Lua code file-per-file and it is hard to
eliminate all dependencies from the src/lua/init.lua code.

This commit extracts the loaders code into its own file. Following
commits will eliminate dependencies on other built-in modules and move
loading of the loaders to the early stage.

The init.lua file contains initialization code from different domains
and it worth to split it further. I'll not do that in this series.

Part of #7774

[1]: https://www.lua.org/manual/5.1/manual.html#pdf-package.loaders

NO_TEST=no user visible changes
NO_CHANGELOG=see NO_TEST
NO_DOC=see NO_TEST
parent a13504d8
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment