Fix namespace collision in std and nupm (#14009)

# Description

Fxes https://github.com/nushell/nupm/issues/102

Not loading `std` at startup has caused an issue with nupm and std where
the `dirs` module name clashes and nupm won't load. This was technically
a preexisting bug that was previously masked. This could have been fixed
(and also should be) by changing the import statement in nupm, but the
potential for collision would remain in other (user) modules.

This PR explicitly sets the relative path for the import statements in
`std/mod.nu` so that there are no collisions.

# User-Facing Changes

Bugfix

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A
This commit is contained in:
Douglas 2024-10-05 15:55:47 -04:00 committed by GitHub
parent 27ebccce80
commit b1379b2b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,21 +4,21 @@
export use lib *
# std submodules
export module assert
export module bench
export module dt
export module formats
export module help
export module input
export module iter
export module log
export module math
export module xml
export module ./assert
export module ./bench
export module ./dt
export module ./formats
export module ./help
export module ./input
export module ./iter
export module ./log
export module ./math
export module ./xml
# Load main dirs command and all subcommands
export use dirs main
export module dirs {
export use dirs [
export use ./dirs main
export module ./dirs {
export use ./dirs [
add
drop
next