File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ cfg-if = "1.0"
4141pkg-config = " 0.3.17"
4242lua-src = { version = " >= 548.1.0, < 548.2.0" , optional = true }
4343luajit-src = { version = " >= 210.6.0, < 210.7.0" , optional = true }
44- luau0-src = { version = " 0.16 .0" , optional = true }
44+ luau0-src = { version = " 0.17 .0" , optional = true }
4545
4646[lints .rust ]
4747unexpected_cfgs = { level = " allow" , check-cfg = [' cfg(raw_dylib)' ] }
Original file line number Diff line number Diff line change @@ -58,6 +58,17 @@ pub struct luarequire_Configuration {
5858 path : * const c_char ,
5959 ) -> luarequire_NavigateResult ,
6060
61+ // Provides a final override opportunity if an alias cannot be found in configuration files. If
62+ // NAVIGATE_SUCCESS is returned, this must update the internal state to point at the aliased module.
63+ // Can be left undefined.
64+ pub to_alias_fallback : Option <
65+ unsafe extern "C-unwind" fn (
66+ L : * mut lua_State ,
67+ ctx : * mut c_void ,
68+ alias_unprefixed : * const c_char ,
69+ ) -> luarequire_NavigateResult ,
70+ > ,
71+
6172 // Navigates through the context by making mutations to the internal state.
6273 pub to_parent :
6374 unsafe extern "C-unwind" fn ( L : * mut lua_State , ctx : * mut c_void ) -> luarequire_NavigateResult ,
Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ pub(super) unsafe extern "C-unwind" fn init_config(config: *mut ffi::luarequire_
299299 ( * config) . is_require_allowed = is_require_allowed;
300300 ( * config) . reset = reset;
301301 ( * config) . jump_to_alias = jump_to_alias;
302+ ( * config) . to_alias_fallback = None ;
302303 ( * config) . to_parent = to_parent;
303304 ( * config) . to_child = to_child;
304305 ( * config) . is_module_present = is_module_present;
You can’t perform that action at this time.
0 commit comments