Conversation
`NOTHING_VARIABLE_ID` is now 3.
this changes the tests and the toolkit, i.e. all mentions to `$nothing` except for those of the deprecation itself.
:sigh: ...
sholderbach
left a comment
There was a problem hiding this comment.
Thanks so much for tackling this with deprecation.
I would say let's mark this as draft until we have made sure the important integrations are up to date as we can update them already to null
|
Went through the list of integrations that advertise in https://github.com/nushell/nushell#officially-supported-by with the admittedly imperfect github search. Only found https://github.com/atuinsh/atuin/blob/fbed2862fda127b747718e4ae6f5f36a56f29a51/atuin/src/shell/atuin.nu to use... |
There was a problem hiding this comment.
The $nothing deprecation looks good to me.
We could make the changing of the "magic" variable IDs a bit more robust in the future by either doing everything with an enum (a bit more hassle) or having a LAST_MAGIC_VARIABLE_ID const that is used for those checks. But not a blocker for this PR.
This accompanies nushell/nushell#10478
|
let's go with this, bye |
`$nothing` will be deprecated in nu 0.86 This accompanies - nushell/nushell#10478
related to - #10478 # Description this PR is the followup removal to #10478. # User-Facing Changes `$nothing` is now an undefined variable, unless define by the user. ```nushell > $nothing Error: nu::parser::variable_not_found × Variable not found. ╭─[entry #1:1:1] 1 │ $nothing · ────┬─── · ╰── variable not found. ╰──── ``` # Tests + Formatting # After Submitting mention that in release notes
related to - nushell#10478 # Description this PR is the followup removal to nushell#10478. # User-Facing Changes `$nothing` is now an undefined variable, unless define by the user. ```nushell > $nothing Error: nu::parser::variable_not_found × Variable not found. ╭─[entry nushell#1:1:1] 1 │ $nothing · ────┬─── · ╰── variable not found. ╰──── ``` # Tests + Formatting # After Submitting mention that in release notes
related to - nushell#9973 - nushell#9918 thanks to @jntrnr and their super useful tips on this PR, i learned about the parser + evaluation, so 🙏 # Description because we already have `null` as the value of the type `nothing` and as a followup to the two other attempts of mine, i propose to remove the redundant `$nothing` built-in variable 😋 this PR is the first step, deprecating `$nothing`. a followup PR will remove it altogether and wait for 0.87 👍 ⚙️ **details**: a new `NOTHING_VARIABLE_ID = 3` has been added, parsing `$nothing` will create it, finally a `Value::Nothing` will be produced and a warning will be reported. this PR already fixes the `toolkit.nu` module so that it does not throw a bunch of warnings each time 👌 # User-Facing Changes `$nothing` is now deprecated and will be removed in 0.87 ```nushell > $nothing Error: × Deprecated variable ╭─[entry #1:1:1] 1 │ $nothing · ────┬─── · ╰── `$nothing` is deprecated and will be removed in 0.87. ╰──── help: Use `null` instead ``` # Tests + Formatting tests have been updated, especially - `nothing_fails_string` - `nothing_fails_int` which use a variable called `nil` now to make sure `nothing` does not support cell paths 👍 # After Submitting classic deprecation mention 👍
related to - nushell#10478 # Description this PR is the followup removal to nushell#10478. # User-Facing Changes `$nothing` is now an undefined variable, unless define by the user. ```nushell > $nothing Error: nu::parser::variable_not_found × Variable not found. ╭─[entry #1:1:1] 1 │ $nothing · ────┬─── · ╰── variable not found. ╰──── ``` # Tests + Formatting # After Submitting mention that in release notes
`$nothing` will be deprecated in nu 0.86 This accompanies - nushell/nushell#10478
`$nothing` will be deprecated in nu 0.86 This accompanies - nushell/nushell#10478
related to
null#9973nullas the value and the type for "nothing" #9918thanks to @jntrnr and their super useful tips on this PR, i learned about the parser + evaluation, so 🙏
Description
because we already have
nullas the value of the typenothingand as a followup to the two other attempts of mine, i propose to remove the redundant$nothingbuilt-in variable 😋this PR is the first step, deprecating
$nothing.a followup PR will remove it altogether and wait for 0.87 👍
⚙️ details: a new
NOTHING_VARIABLE_ID = 3has been added, parsing$nothingwill create it, finally aValue::Nothingwill be produced and a warning will be reported.this PR already fixes the
toolkit.numodule so that it does not throw a bunch of warnings each time 👌User-Facing Changes
$nothingis now deprecated and will be removed in 0.87Tests + Formatting
tests have been updated, especially
nothing_fails_stringnothing_fails_intwhich use a variable called
nilnow to make surenothingdoes not support cell paths 👍After Submitting
classic deprecation mention 👍