Partial workaround and deprecation warning for breaking change usage of #15654#15806
Conversation
|
We still need this despite #15770, right? (or do you want to reimplement parts of this with the new logic? |
Yea we'll still need this, although it doesn't really integrate with #15770 since that only handles parse-time deprecation warnings (I would be interested in a follow-up that also had some mechanism for run-time deprecation warnings, but I'm not exactly sure what that would look like) |
45ed67c to
098e29f
Compare
|
I updated the wording of the error to try to be more clear (although it might be too wordy now..) and I also changed the |
sholderbach
left a comment
There was a problem hiding this comment.
Thanks, need to put a pin into that to properly remove your carapace hack :D
| let carapace_suggestion = "re-run carapace init with version v1.3.3 or later\nor, change this to `{ $carapace_completer }`"; | ||
| let suggestion = match span_contents { | ||
| Cow::Borrowed("$carapace_completer") => carapace_suggestion.to_string(), |
nushell#15654 (nushell#15806) # Description Adds a temporary workaround to prevent nushell#15654 from being a breaking change when using a closure stored in a variable, and issues a warning. Also has a special case related to carapace-sh/carapace-bin#2796 which suggests re-running `carapace init`   # After Submitting Remove variable name detection after grace period
# Description Adds a proper `ShellWarning` enum which has the same functionality as `ParseWarning`. Also moves the deprecation from #15806 into `ShellWarning::Deprecated` with `ReportMode::FirstUse`, so that warning will only pop up once now. # User-Facing Changes Technically the change to the deprecation warning from #15806 is user facing but it's really not worth listing in the changelog
# Description Adds a proper `ShellWarning` enum which has the same functionality as `ParseWarning`. Also moves the deprecation from nushell#15806 into `ShellWarning::Deprecated` with `ReportMode::FirstUse`, so that warning will only pop up once now. # User-Facing Changes Technically the change to the deprecation warning from nushell#15806 is user facing but it's really not worth listing in the changelog

Description
Adds a temporary workaround to prevent #15654 from being a breaking change when using a closure stored in a variable, and issues a warning. Also has a special case related to carapace-sh/carapace-bin#2796 which suggests re-running
carapace initUser-Facing Changes
Tests + Formatting
After Submitting