Update internal use of decimal to float#10333
Merged
sholderbach merged 9 commits intonushell:mainfrom Sep 13, 2023
Merged
Conversation
`impl Display` updated separately
Separate commit as this may affect tooling if we have a location where `SyntaxShape::to_string` or similar is read.
24 tasks
Member
Author
|
Update on the impact of changing the display name of Affected would be the |
Contributor
|
@sholderbach - is the type/shape name the user types now |
Member
Author
It already supported both this PR does not yet remove the latter. |
Member
soon 😏 |
Member
Author
Member
loving it 💪 |
hardfau1t
pushed a commit
to hardfau1t/nushell
that referenced
this pull request
Dec 14, 2023
# Description We made the decision that our floating point type should be referred to as `float` over `decimal`. Commands were updated by nushell#9979 and nushell#10320 Now make the internal codebase consistent in referring to this data type as `float`. Work for nushell#10332 # User-Facing Changes `decimal` has been removed as a type name/symbol. Instead of ```nushell def foo [bar: decimal] decimal -> decimal {} ``` use ```nushell def foo [bar: float] float -> float {} ``` Potential effect of `SyntaxShape`'s `Display` implementation now also referring to `float` instead of `decimal` # Details - Rename `SyntaxShape::Decimal` to `Float` - Update `Display for SyntaxShape` to `float` - Update error message + fn name in dataframe code - Fix docs in command examples - Rename tests that are float specific - Update doccomment on `SyntaxShape` - Update comment in script # Tests + Formatting Updates the names of some tests
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
We made the decision that our floating point type should be referred to as
floatoverdecimal.Commands were updated by #9979 and #10320
Now make the internal codebase consistent in referring to this data type as
float.Work for #10332
User-Facing Changes
decimalhas been removed as a type name/symbol.Instead of
use
Potential effect of
SyntaxShape'sDisplayimplementation now also referring tofloatinstead ofdecimalDetails
SyntaxShape::DecimaltoFloatDisplay for SyntaxShapetofloatSyntaxShapeTests + Formatting
Updates the names of some tests