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

lua: don't use public module name as internal one

There are modules that are implemented as two parts: a Lua/C module for
internal use and a public module written on Lua. There is a practice to
name both parts the same: just capture the internal part within the
public part and rewrite `package.loaded` then.

This name overlap is confusing at reading the sources and complicates
debugging. And it conflicts with a built-in module loading logic that
will be implemented for #7774.

Let's use `foo.lib` for the internal part and `foo` for the public one.
This approach is already used in some built-in modules.

src/box/lua/upgrade.lua requires src/box/lua/xlog.lua, so changed the
loading order.

Eliminated extra `internal` field in `uri.lib`, because the whole module
is internal.

Part of #7774

NO_DOC=user visible behavior is unchanged, pure refactoring change
NO_TEST=see NO_DOC
NO_CHANGELOG=see NO_DOC
parent 21599ec5
No related branches found
No related tags found
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