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
Display empty records and lists #7925
Conversation
Thank you; this looks like a really good improvement! For It would be a breaking change, but maybe we should finally change those to return |
I asked on Discord and other people agree that we should change the filesystem commands to return Would you be up for making that change (either as part of this PR or in another PR)? Sorry that this is turning into a bit of a yak shave 😭 |
Yes, I can do this. I will make a separate PR. It will be easier to work for me that way |
# Description Makes `mkdir`, `cp`, `mv` and `rm` return nothing and print info to stderr: ![image](https://user-images.githubusercontent.com/17511668/217859228-feffa4bc-c22d-45d3-b330-1903f5a4d938.png) See #7925 (comment) and [discord](https://discord.com/channels/601130461678272522/615329862395101194/1072523941865857055). # User-Facing Changes `mkdir`, `cp`, `mv` and `rm` will return nothing and print info to stderr with `--verbose` flag. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
I vote for on by default. I don't think it needs to be configurable, but I'm OK with a config option if you want one. |
I already did it this way. This PR is ready for review if somebody got time. |
Cool! I haven't had time to do a full code review yet, but I'll try to get to it soon. We discussed this PR in the weekly team meeting, and we agreed that we like the change. It's probably going to break a few things, so the plan is to merge it shortly after the next release (which is on Feb 21) - that will give us more time to test it in |
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.
LGTM. Thank you for the PR!
Looking forward to merging this after the upcoming release.
@NotLebedev would you mind fixing these conflicts so we can merge this pr? Thanks! |
I'm wondering if this change is breaking our table tests or just if another merge main is needed since I just landed another table thing? |
It broke a test. There were missing |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #7925 +/- ##
==========================================
- Coverage 54.28% 54.21% -0.07%
==========================================
Files 608 608
Lines 98949 99138 +189
==========================================
+ Hits 53713 53748 +35
- Misses 45236 45390 +154
|
Let's try it out. |
Following up on the discussion in #8014 (comment) How are we feeling about this one? We're 9 days from the release and it seems like we're still running into related issues. I'm wondering if we should temporarily disable this feature to give us more time to polish it. It feels like this PR has led to several others like #8292 and I don't think we're in a place where we can confidently explain to users "here's what we changed, and here's why it's better" yet. |
I agree. This and related changes are a bit raw currently. #8292 is sure to cause some more trouble and may bring up some more changes. This one can be removed from release entirely or disabled by default for this release via |
@NotLebedev Do you have time to submit a PR to disable this? If not I'll get around to it later today or tomorrow. |
Can do. Are we disabling it by default or what should I do? |
I don't know what the best thing to do is (haven't had time to think about this much). |
To me, the most important thing currently is to make sure |
# Description Hides #7925 from config and disables by default. Option is still present in config, just hidden. # User-Facing Changes Users can no longer find `table.show_empty` in config and it is set to false by default. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
Description
Fix some issues related to #7444
User-Facing Changes
table
command now displays empty records and lists like a table with text and correctly displays empty records inside tables and lists.New behavior of displaying empty lists and records can be disabled using
table.show_empty
config option.Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --check
to check standard code formatting (cargo fmt --all
applies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
to check that you're using the standard code stylecargo test --workspace
to check that all tests passAfter Submitting
If your PR had any user-facing changes, update the documentation after the PR is merged, if necessary. This will help us keep the docs up to date.