New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REFACTOR: move the 0% commands to nu-cmd-extra
#9404
REFACTOR: move the 0% commands to nu-cmd-extra
#9404
Conversation
Commands used: ```nu mkdir crates/nu-cmd-extra/src/extra/filters/ crates/nu-cmd-extra/src/extra/filters/roll/ mv crates/nu-command/src/filters/each_while.rs crates/nu-cmd-extra/src/extra/filters/each_while.rs mv crates/nu-command/src/filters/update_cells.rs crates/nu-cmd-extra/src/extra/filters/update_cells.rs mv crates/nu-command/src/filters/rotate.rs crates/nu-cmd-extra/src/extra/filters/rotate.rs mv crates/nu-command/src/filters/roll/ crates/nu-cmd-extra/src/extra/filters/roll/ mkdir crates/nu-cmd-extra/src/extra/strings/encode_decode/ mv crates/nu-command/src/strings/encode_decode/hex.rs crates/nu-cmd-extra/src/extra/strings/encode_decode/_hex.rs mv crates/nu-command/src/strings/encode_decode/encode_hex.rs crates/nu-cmd-extra/src/extra/strings/encode_decode/encode_hex.rs mv crates/nu-command/src/strings/encode_decode/decode_hex.rs crates/nu-cmd-extra/src/extra/strings/encode_decode/decode_hex.rs mv crates/nu-command/src/strings/format/ crates/nu-cmd-extra/src/extra/strings/format/ mkdir crates/nu-cmd-extra/src/extra/formats/to/ crates/nu-cmd-extra/src/extra/formats/from/ mv crates/nu-command/src/formats/to/html.rs crates/nu-cmd-extra/src/extra/formats/to/html.rs mv crates/nu-command/src/formats/from/url.rs crates/nu-cmd-extra/src/extra/formats/from/url.rs mkdir crates/nu-cmd-extra/src/extra/platform/ansi/ mv crates/nu-command/src/platform/ansi/gradient.rs crates/nu-cmd-extra/src/extra/platform/ansi/gradient.rs ```
@amtoine I thought we were going to move the math commands and the bytes commands first prior to considering doing these ? That is why I started with bits... In our core team meeting a few weeks back we all agreed to do those first... So I will let others comment on which commands they want to move across besides |
However, I am OK with moving all of these commands across to nu-cmd-extra as well... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with moving these commands across to nu-cmd-extra...
However we should get feedback from some other folks as well...
Just to make sure they are OK with it too. 😄
@stormasm |
i'll continue working on this in the meantime, this won't be lost work 👌 |
nu-cmd-extra
nu-cmd-extra
related to - #9404 # Description to support our cratification effort and moving non-1.0 commands outside of the main focus, this PR - creates a new `nu-cmd-base` crate to hold the common structs, traits and functions used by all command-related crates - to start the transition, moves the `input_handler` module from `nu-command` to `nu-cmd-base` # User-Facing Changes ``` $nothing ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib` # After Submitting ``` $nothing ```
related to - nushell#9404 # Description to support our cratification effort and moving non-1.0 commands outside of the main focus, this PR - creates a new `nu-cmd-base` crate to hold the common structs, traits and functions used by all command-related crates - to start the transition, moves the `input_handler` module from `nu-command` to `nu-cmd-base` # User-Facing Changes ``` $nothing ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib` # After Submitting ``` $nothing ```
this should solve the merge conflict in nushell#9404.
this solves the following error ``` error: proc-macro derive panicked --> crates/nu-cmd-extra/src/extra/formats/to/html.rs:79:10 | 79 | #[derive(RustEmbed)] | ^^^^^^^^^ | = help: message: #[derive(RustEmbed)] folder '/home/amtoine/.local/share/git/store/github.com/amtoine/nushell/crates/nu-cmd-extra/assets/' does not exist. cwd: '/home/amtoine/.local/share/git/store/github.com/amtoine/nushell' error[E0599]: no function or associated item named `get` found for struct `Assets` in the current scope --> crates/nu-cmd-extra/src/extra/formats/to/html.rs:228:19 | 81 | struct Assets; | ------------- function or associated item `get` not found for this struct ... 228 | match Assets::get(json_name) { | ^^^ function or associated item not found in `Assets` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `get`, perhaps you need to implement one of them: candidate #1: `SliceIndex` candidate #2: `RustEmbed` For more information about this error, try `rustc --explain E0599`. error: could not compile `nu-cmd-extra` due to 2 previous errors warning: build failed, waiting for other jobs to finish... ```
@stormasm
now i'm trying to fix the tests but i have some trouble... |
@amtoine see my comments to you in discord 😄 |
* bring `enumerate` and `if` into `extra` tests * disable all failing tests when not in `extra`
this should solve the merge conflicts in nushell#9404.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @amtoine
requires
nu-command
tonu-cmd-base
#9455⚙️ Description
in this PR i move the commands we've all agreed, in the core team, to move out of the core Nushell to the
extra
feature.the list of commands to move
with the current command table downloaded as
commands.csv
, i've runto preprocess them and then
to get all untreated commands with no approval, which gives
🖌️ User-Facing Changes
🧪 Tests + Formatting
toolkit fmt
toolkit clippy
toolkit test
toolkit test stdlib
📖 After Submitting
🔍 For reviewers
should give no output in
cargo run --features extra -- -n
and a table with 16 lines incargo run -- -n