REFACTOR: remove the shell commands#8415
Conversation
This commit makes clippy happy.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8415 +/- ##
==========================================
- Coverage 68.99% 68.93% -0.07%
==========================================
Files 641 635 -6
Lines 102470 102041 -429
==========================================
- Hits 70703 70341 -362
+ Misses 31767 31700 -67
|
|
It may be good to look at the tests here and make sure we have similar tests on the stdlib side. |
💯 i can file an issue to list these tests once this PR is merged? |
|
Can we hold off on merging this until we have an easy way for user to
install the standard library? I'm working on a manual install that should
be ready real soon now, then we could document a fairly smooth transition
for users.
…On Sun, Mar 12, 2023 at 7:12 AM Antoine Stevan ***@***.***> wrote:
Related to #8368 <#8368>.
Warning
we do not want to merge this PR until we have a proper way to ship the
standard library.
this is just a preliminary work to prepare the transition 😌
Description
as planned in #8311 <#8311>, the
enter, shells, g, n and p commands have been re-implemented in pure-
nushell in the standard library.
this PR removes the rust implementations of these commands.
- all the "shells" tests have been removed from
crates/nu-commnand/tests/commands/ in 2cc6a82
<2cc6a82>,
except for the exit command
- cd does not use the shells feature in its source code anymore =>
that does not change its single-shell behaviour
- all the command implementations have been removed from
crates/nu-command/src/shells/, except for exit.rs => mod.rs has been
modified accordingly
- the exit command now does not compute any "shell" related things
- the --now option has been removed from exit, as it does not serve
any purpose without sub-shells
User-Facing Changes
users may now not use enter, shells, g, n and p
now they would have to use the standard library to have access to
equivalent features, thanks to the dirs.nu module introduced by @bobhy
<https://github.com/bobhy> in #8368
<#8368>
Tests + Formatting
- 🟢 toolkit check pr
After Submitting
the website will have to be regenerated to reflect the removed commands 👍
------------------------------
You can view, comment on, or merge this pull request online at:
#8415
Commit Summary
- aea3598
<aea3598>
remove the `enter`, `g`, `n`, `p` and `shells` commands
- c605fcb
<c605fcb>
remove the previous modules from the main `shells` module
- f27b9db
<f27b9db>
remove all previous usage of `enter`, `shells`, `g`, `n` and `p`
- 31b9c3f
<31b9c3f>
remove the now deprecated `exit --now` option
- a043bc3
<a043bc3>
apply `toolkit fmt`
- 2cc6a82
<2cc6a82>
remove all the `enter`, `shells`, `n`, `p` and `g` tests
File Changes
(16 files <https://github.com/nushell/nushell/pull/8415/files>)
- *M* crates/nu-command/src/default_context.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-bd1f8d1c03c0b2cbfc9322d28fe71ff96b94dea93b435a0117a5305fb950157d>
(5)
- *M* crates/nu-command/src/filesystem/cd.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-da1c996c239d58a4c1c14a3be1f14d8de81444cd5ac277f24642325e0696285f>
(18)
- *D* crates/nu-command/src/shells/enter.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-3857357ba932ba8bdd5948c13f26662d7f91e635a6c8425fab5da72f4847f533>
(103)
- *M* crates/nu-command/src/shells/exit.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-fbda28fdcbb24a2bc07a84d5e1b822941ead8861e919bcc79cd3b42ff1960768>
(76)
- *D* crates/nu-command/src/shells/g.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-d14ca90d254caf8f8005d7e76e42286273bd0f12644c938e77809d9b10def171>
(88)
- *M* crates/nu-command/src/shells/mod.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-292093812bccafdd2ef9a2a50e503cf4093f646ba91e0bad5f59b4374b418986>
(144)
- *D* crates/nu-command/src/shells/n.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-7284ea0fe9a04d565378b7221e69d8fc9488f95d54134960c2ede7b7755eae87>
(49)
- *D* crates/nu-command/src/shells/p.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-c58d1ee6c15e9f1bc29cbb1561f0c22003c5ba39cad18afb329d818a0f1a6467>
(49)
- *D* crates/nu-command/src/shells/shells_.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-435472365d573deb343a00b1a9d5b28e15fc34ba7ec7eb4f643d7c10e84b3c0a>
(49)
- *D* crates/nu-command/tests/commands/enter.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-4365f905861fbb2274309a7207eb7e52f0b54d0121c51106bc34138ba98e385f>
(73)
- *D* crates/nu-command/tests/commands/g.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-9fb6bc80624ddaad3787e14bd4b73559871d7f233360a428ec38acada28ae033>
(91)
- *M* crates/nu-command/tests/commands/mod.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-e7993bcda122ebf215a2b3206974733eb49dfa4d6f30cee5cb6f900aaf953adc>
(5)
- *D* crates/nu-command/tests/commands/n.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-dd0bee5e1c396fde065e4a00a296f93e1800f8d30eccdcf6393eb054bf67a80a>
(31)
- *D* crates/nu-command/tests/commands/p.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-5cd89cdbe7549be866ab0f3ea9e8bdb74df5d055dbba2ff64d52609db1233266>
(31)
- *D* crates/nu-command/tests/commands/shells.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-989d38eb3b552b0d4a836cdb87d1d01d5cc47e95f949176e816c1e3ace884390>
(31)
- *M* src/tests/test_parser.rs
<https://github.com/nushell/nushell/pull/8415/files#diff-0e5c76c9621e4b45a0f17b7ab1961773a5646837b86632b130154dcbd4c85fed>
(9)
Patch Links:
- https://github.com/nushell/nushell/pull/8415.patch
- https://github.com/nushell/nushell/pull/8415.diff
—
Reply to this email directly, view it on GitHub
<#8415>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPBIZE2TCYLUHJB4WKEG4DW3WVTRANCNFSM6AAAAAAVYBUSCQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
do not worry, this will stay a DRAFT until that time has come 😉 and it's mentionned at the very top in the ":warning: Warning" 😋 |
This should solve the merge conflicts from nushell#8415.
|
I have a tiny bit of hesitancy because we're essentially replacing the shells commands with nearly identical clones but we're changing all the names. I'm wondering if we should either name the dirs commands to match or make aliases to help shells users get up to speed without spending time figuring out what is broken? Interested in other's thoughts. |
|
Hmm, "Welcome to the wonderful world of pre V1 software, where there
are no promises of backward compatibility?"
I think a release note documenting the lossage and the replacement
aliases should suffice.
…On Fri, Apr 28, 2023 at 10:06 AM Darren Schroeder ***@***.***> wrote:
I have a tiny bit of hesitancy because we're essentially replacing the shells commands with nearly identical clones but we're changing all the names. I'm wondering if we should either name the dirs commands to match or make aliases to help shells users get up to speed without spending time figuring out what is broken? Interested in other's thoughts.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
i do not have a strong preference 🤔 😋
|
|
what do we do here in the end @fdncred? |
|
i'd vote to land it after the next release in a coupld days if we can get synonym aliases for defs for backwards compatibility for |
let's go for this then 😋
do you mean adding Nushell aliases in
there is no conflict, you just want to re run the CI with the latest |
I meant in the module itself so that anyone who uses it will have the backwards compatible usage.
Even though the CI is green, there have been changes since the PR as submitted and sometimes we get into trouble if we have PRs that have set for a long time and then land them. |
|
I think the |
This is what I meant, just said better. 😄 |
This is to bring the latest `main` into nushell#8415 and check that the CI runs without any issue. nushell#8415 has been open for quite a long time so it does not cost anything to try the CI with a more recent `main`.
|
first, let's run the CI... ♻️ |
|
this should be better with the last two commits 😌 |
|
@amtoine I think this is close.
or maybe just I'm not sure either of these work but I think you get my point. We have a |
|
ok, let's try this removal and see if anyone notices. |
|
because we added the compatibility aliases, i'm wondering if this still is a breaking change 🤔 |
i think so, if only because exit is not dexit for the new shells commands. or maybe mostly-non-breaking, and only 1 command is a breaking change. not sure of a good way to state that. |
|
if there is a single tiny detail which is a breaking change, then the whole thing is a breaking change 😌 |
Since nushell#8415 it no longer manipulates shells.
Since nushell#8415 it no longer manipulates shells.
Since #8415 the `exit` command no longer manipulates shells.
Related to #8368.
Description
as planned in #8311, the
enter,shells,g,nandpcommands have been re-implemented in pure-nushellin the standard library.this PR removes the
rustimplementations of these commands.crates/nu-commnand/tests/commands/in 2cc6a82, except for theexitcommandcddoes not use theshellsfeature in its source code anymore => that does not change its single-shell behaviourcrates/nu-command/src/shells/, except forexit.rs=>mod.rshas been modified accordinglyexitcommand now does not compute any "shell" related things--nowoption has been removed fromexit, as it does not serve any purpose without sub-shellsUser-Facing Changes
users may now not use
enter,shells,g,nandpnow they would have to use the standard library to have access to equivalent features, thanks to the
dirs.numodule introduced by @bobhy in #8368Tests + Formatting
toolkit fmttoolkit clippytoolkit testtoolkit test stdlibAfter Submitting
the website will have to be regenerated to reflect the removed commands 👍