-
Notifications
You must be signed in to change notification settings - Fork 2.1k
remove directory module autoexport #11133
Copy link
Copy link
Closed
Labels
A:modulesIssues related to functionality of the module system. See also usage:modulesIssues related to functionality of the module system. See also usage:modulescategory:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Milestone
Description
Related problem
we've discussed this on Discord and in a Nushell meeting: directory module auto-exports are handy but sometimes annoying and force to do strange things
- to hide a module as internal, you'd have to put it inside a subdirectory without any
mod.nu - trying to export definitions manually produces duplicated objects, e.g. 4 times the same command in
help main-command
it has been agreed in said meeting that this feature could be removed to allow more power when it comes to module architecture 😋
Describe the solution you'd like
i think it would be great to remove the auto-export by default => users would have to export them manually, as in more traditional languages such as Rust or Python.
we could imagine a new syntax that would export all from directory, something like
use dir/*Describe alternatives you've considered
No response
Additional context and details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:modulesIssues related to functionality of the module system. See also usage:modulesIssues related to functionality of the module system. See also usage:modulescategory:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look