clean up config by removing legacy options#9496
Merged
fdncred merged 2 commits intonushell:mainfrom Jun 23, 2023
Merged
Conversation
Member
|
this sounds a very great idea, thanks for the cleanup @fdncred 😊 |
amtoine
approved these changes
Jun 21, 2023
Member
amtoine
left a comment
There was a problem hiding this comment.
i do not even remember using these once 😱
so assuming virtualenv stops complaining, leeeeet's go 🚀
Contributor
|
Sounds like a fine idea 😄 |
sholderbach
approved these changes
Jun 23, 2023
Member
sholderbach
left a comment
There was a problem hiding this comment.
+1 from me as well. And as we explicitly had this warning for using the legacy options, the blast radius of making this breaking change should be limited.
Contributor
Author
agreed. let's land this. |
fnordpig
pushed a commit
to fnordpig/nushell
that referenced
this pull request
Jun 23, 2023
This PR cleans up the deprecated legacy config options that were deprecated in nushell version 0.72.0. These are the config points that were in the root of the config but also duplicated in the nested structures. For instance `use_ls_colors` was in the root of the config and also in the `ls.use_ls_colors` nested structure. This was originally done to preserve backwards compatibility when nested structures were introduced in the config file. Here's a list of the legacy config points that were removed. - `use_ls_colors` - previously replaced with `ls.use_ls_colors` - `rm_always_trash` - previously replaced with `rm.always_trash` - `history_file_format` - previously replaced with `history.file_format` - `sync_history_on_enter` - previously replaced with `history.sync_on_enter` - `max_history_size` - previously replaced with `history.max_size` - `quick_completions` - previously replaced with `completions.quick` - `partial_completions` - previously replaced with `completions.partial` - `max_external_completion_results` - previously replaced with `completions.external.max_results` - `completion_algorithm` - previously replaced with `completions.algorithm` - `case_sensitive_completions` - previously replaced with `completions.case_sensitive` - `enable_external_completion` - previously replaced with `completions.external.enable` - `external_completer` - previously replaced with `completions.external.completer` - `table_mode` - previously replaced with `table.mode` - `table_index_mode` - previously replaced with `table.index_mode` - `table_trim` - previously replaced with `table.trim` - `show_clickable_links_in_ls` - previously replaced with `ls.clickable_links` - `cd_with_abbreviations` - previously replaced with `cd.abbreviations` - `filesize_metric` - previously replaced with `filesize.metric` - `filesize_format` - previously replaced with `filesize.format` - `cursor_shape_vi_insert` - previously replaced with `cursor_shape.vi_insert` - `cursor_shape_vi_normal` - previously replaced with `cursor_shape.vi_normal` - `cursor_shape_emacs` - previously replaced with `cursor_shape.emacs` Removes log_level from the config since it doesn't do anything any longer. We moved log-level to a nushell parameter some time ago. Renames history_isolation to isolation in the config.nu for consistency. Fixes a couple bugs where values weren't being set in the "// Reconstruct" sections (history_isolation, table_show_empty). Reorganized/Moved things around a tiny bit and added a few comments. history.histor_isolation is now history.isolation. If anyone is still using the legacy config points, deprecated since 0.72.0 2022-11-29, their config will break. <!-- 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 -A clippy::result_large_err` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> <!-- 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. -->
fnordpig
pushed a commit
to fnordpig/nushell
that referenced
this pull request
Jun 23, 2023
This PR cleans up the deprecated legacy config options that were deprecated in nushell version 0.72.0. These are the config points that were in the root of the config but also duplicated in the nested structures. For instance `use_ls_colors` was in the root of the config and also in the `ls.use_ls_colors` nested structure. This was originally done to preserve backwards compatibility when nested structures were introduced in the config file. Here's a list of the legacy config points that were removed. - `use_ls_colors` - previously replaced with `ls.use_ls_colors` - `rm_always_trash` - previously replaced with `rm.always_trash` - `history_file_format` - previously replaced with `history.file_format` - `sync_history_on_enter` - previously replaced with `history.sync_on_enter` - `max_history_size` - previously replaced with `history.max_size` - `quick_completions` - previously replaced with `completions.quick` - `partial_completions` - previously replaced with `completions.partial` - `max_external_completion_results` - previously replaced with `completions.external.max_results` - `completion_algorithm` - previously replaced with `completions.algorithm` - `case_sensitive_completions` - previously replaced with `completions.case_sensitive` - `enable_external_completion` - previously replaced with `completions.external.enable` - `external_completer` - previously replaced with `completions.external.completer` - `table_mode` - previously replaced with `table.mode` - `table_index_mode` - previously replaced with `table.index_mode` - `table_trim` - previously replaced with `table.trim` - `show_clickable_links_in_ls` - previously replaced with `ls.clickable_links` - `cd_with_abbreviations` - previously replaced with `cd.abbreviations` - `filesize_metric` - previously replaced with `filesize.metric` - `filesize_format` - previously replaced with `filesize.format` - `cursor_shape_vi_insert` - previously replaced with `cursor_shape.vi_insert` - `cursor_shape_vi_normal` - previously replaced with `cursor_shape.vi_normal` - `cursor_shape_emacs` - previously replaced with `cursor_shape.emacs` Removes log_level from the config since it doesn't do anything any longer. We moved log-level to a nushell parameter some time ago. Renames history_isolation to isolation in the config.nu for consistency. Fixes a couple bugs where values weren't being set in the "// Reconstruct" sections (history_isolation, table_show_empty). Reorganized/Moved things around a tiny bit and added a few comments. history.histor_isolation is now history.isolation. If anyone is still using the legacy config points, deprecated since 0.72.0 2022-11-29, their config will break. <!-- 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 -A clippy::result_large_err` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> <!-- 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. -->
This was referenced Jul 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR cleans up the deprecated legacy config options that were deprecated in nushell version 0.72.0. These are the config points that were in the root of the config but also duplicated in the nested structures. For instance
use_ls_colorswas in the root of the config and also in thels.use_ls_colorsnested structure. This was originally done to preserve backwards compatibility when nested structures were introduced in the config file.Here's a list of the legacy config points that were removed.
use_ls_colors- previously replaced withls.use_ls_colorsrm_always_trash- previously replaced withrm.always_trashhistory_file_format- previously replaced withhistory.file_formatsync_history_on_enter- previously replaced withhistory.sync_on_entermax_history_size- previously replaced withhistory.max_sizequick_completions- previously replaced withcompletions.quickpartial_completions- previously replaced withcompletions.partialmax_external_completion_results- previously replaced withcompletions.external.max_resultscompletion_algorithm- previously replaced withcompletions.algorithmcase_sensitive_completions- previously replaced withcompletions.case_sensitiveenable_external_completion- previously replaced withcompletions.external.enableexternal_completer- previously replaced withcompletions.external.completertable_mode- previously replaced withtable.modetable_index_mode- previously replaced withtable.index_modetable_trim- previously replaced withtable.trimshow_clickable_links_in_ls- previously replaced withls.clickable_linkscd_with_abbreviations- previously replaced withcd.abbreviationsfilesize_metric- previously replaced withfilesize.metricfilesize_format- previously replaced withfilesize.formatcursor_shape_vi_insert- previously replaced withcursor_shape.vi_insertcursor_shape_vi_normal- previously replaced withcursor_shape.vi_normalcursor_shape_emacs- previously replaced withcursor_shape.emacsRemoves log_level from the config since it doesn't do anything any longer. We moved log-level to a nushell parameter some time ago.
Renames
history_isolationtoisolationin the config.nu for consistency.Fixes a couple bugs where values weren't being set in the "// Reconstruct" sections (history_isolation, table_show_empty).
Reorganized/Moved things around a tiny bit and added a few comments.
User-Facing Changes
history.history_isolation is now history.isolation.
If anyone is still using the legacy config points, deprecated since 0.72.0 2022-11-29, their config will break.
Tests + Formatting
After Submitting