Describe the bug
When using darklua_core programmatically, LuauRequireMode cannot be instantiated directly because it is marked as pub(crate) in the module hierarchy, whereas PathRequireMode is exported as pub.
As a result, users cannot construct a BundleConfiguration using BundleRequireMode::Luau in Rust code.
To Reproduce
Attempting to construct a bundle configuration using BundleRequireMode::Luau:
use darklua_core::rules::require::LuauRequireMode; // Error: module or type is private / pub(crate)
use darklua_core::rules::BundleRequireMode;
use darklua_core::config::Configuration;
use darklua_core::bundle::BundleConfiguration;
let configuration = Configuration::empty().with_bundle_configuration(
BundleConfiguration::new(
BundleRequireMode::Luau(LuauRequireMode::default()),
)
);
Expected behavior
LuauRequireMode should be publicly accessible (pub) just like PathRequireMode, allowing full programmatic access:
use darklua_core::rules::require::PathRequireMode; // Works fine
let configuration = Configuration::empty().with_bundle_configuration(
BundleConfiguration::new(
BundleRequireMode::Path(PathRequireMode::default()),
)
);
Suggested Solution
Change the visibility of LuauRequireMode from pub(crate) to pub.
Describe the bug
When using
darklua_coreprogrammatically,LuauRequireModecannot be instantiated directly because it is marked aspub(crate)in the module hierarchy, whereasPathRequireModeis exported aspub.As a result, users cannot construct a
BundleConfigurationusingBundleRequireMode::Luauin Rust code.To Reproduce
Attempting to construct a bundle configuration using
BundleRequireMode::Luau:Expected behavior
LuauRequireModeshould be publicly accessible (pub) just likePathRequireMode, allowing full programmatic access:Suggested Solution
Change the visibility of
LuauRequireModefrompub(crate)topub.