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

lua: allow to override a built-in module

This commit finishes implementation of the logic for overriding built-in
modules. It adds the loader, which looks into a file system for
`override.foo` module when `foo` is required. It works as for
`require()` in an application/module code as well as for `require()`
called from tarantool during its initialization.

Added replacements into the treegen testing helper.

Disabled the override loader in the LuaJIT submodule test suites. It is
done using `debug.getupvalue()`, which is a fragile way. Don't worry:
the next commit reimplements this logic.

Fixes #7774

@TarantoolBot document
Title: Built-in modules overriding

Now it is possible to override a built-in module. Everything is simple
here, in fact: if `override.foo` module exists on default search paths,
it'll replace built-in `foo` module.
parent e0a4425c
No related merge requests found
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