Fix setting configuration params#629
Merged
sophiajt merged 2 commits intonushell:masterfrom Sep 9, 2019
Merged
Conversation
Fixes nushell#627 Fixes a regression caused by nushell#579, specifically commit cc8872b . The code was intended to perform a comparison between the wanted output type and "Tagged<Value>" in order to be able to provide a special-cased path for Tagged<Value>. When I wrote the code, I used "name" as a variable name and only later realized that it shadowed the "name" param to the function, so I renamed it to type_name, but forgot to change the comparison. This broke the special-casing, as the name param only contains the name of the struct without generics (like "Tagged"), while `std::any::type_name` (in the current implementation) contains the full paths of the struct including all generic params (like "nu::object::meta::Tagged<nu::object::base::Value>").
Contributor
Author
|
I would like to add a regression test here but have no idea how to add one. Running |
Contributor
|
@est31 - I was wondering that too. At some point, we may have a way of mocking changes to the configuration that we can test against. For now, though, I think it's okay to just fix it and test for what we can. |
Hofer-Julian
pushed a commit
to Hofer-Julian/nushell
that referenced
this pull request
Jan 27, 2023
* Update installation.md Clarifies what `--features=extra` actually includes * tweaked wording Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
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.
Fixes #627
Fixes a regression caused by #579, specifically commit cc8872b .
The code was intended to perform a comparison between the wanted
output type and "Tagged" in order to be able to provide a
special-cased path for Tagged. When I wrote the code, I
used "name" as a variable name and only later realized that it
shadowed the "name" param to the function, so I renamed it to
type_name, but forgot to change the comparison.
This broke the special-casing, as the name param only contains
the name of the struct without generics (like "Tagged"), while
std::any::type_name(in the current implementation) containsthe full paths of the struct including all generic params
(like "nu::object::meta::Taggednu::object::base::Value").