stdlib: make helper modules available in std (#8841)

> **Note**
> waiting for the following to land
> - https://github.com/nushell/nushell/pull/8824 to avoid conflicts,
i'll add this to `CONTRIBUTING.md` once it's ready 👍

should close #8839 

# Description
this PR moves the `log` submodule of `std` to the top of the call stack,
making it available in the rest of the library as `log`.
i've added some comments around the `submodules` list in
`load_standard_library` to make it clear how it should work.
 
# User-Facing Changes
`log` and `assert` are now available in the rest of `std`.

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
-  `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
```
$nothing
```
This commit is contained in:
Antoine Stevan 2023-04-10 20:32:33 +02:00 committed by GitHub
parent de76c7a57d
commit 6d51e34d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,11 +66,16 @@ pub fn load_standard_library(
let name = "std".to_string();
let content = include_str!("../lib/mod.nu");
// these modules are loaded in the order they appear in this list
#[rustfmt::skip]
let submodules = vec![
// helper modules that could be used in other parts of the library
("log", include_str!("../lib/log.nu")),
("assert", include_str!("../lib/assert.nu")),
// the rest of the library
("dirs", include_str!("../lib/dirs.nu")),
("help", include_str!("../lib/help.nu")),
("log", include_str!("../lib/log.nu")),
("xml", include_str!("../lib/xml.nu")),
];