Skip to content

Rename random integer to random int#10520

Merged
sholderbach merged 1 commit intonushell:mainfrom
sholderbach:random-integration
Sep 28, 2023
Merged

Rename random integer to random int#10520
sholderbach merged 1 commit intonushell:mainfrom
sholderbach:random-integration

Conversation

@sholderbach
Copy link
Copy Markdown
Member

Description

h/t @1Kinoti

Work for #10332

User-Facing Changes

Deprecate random integer in the next release

New command random int

Tests + Formatting

(-)

Deprecate `random integer` in the next release

New command `random int`
@sholderbach sholderbach added notes:mention Include the release notes summary in the "Hall of Fame" section category:deprecation Related to the deprecation of commands/features/options labels Sep 27, 2023
@sholderbach sholderbach merged commit cc76746 into nushell:main Sep 28, 2023
@sholderbach sholderbach deleted the random-integration branch September 28, 2023 09:47
sholderbach added a commit to sholderbach/nushell that referenced this pull request Oct 2, 2023
Missed those in nushell#10520

moved and fixed the tests so they will work in the future
amtoine pushed a commit that referenced this pull request Oct 3, 2023
# Description
When referring to the type use `int` consistently. Only when referring
to the concept of integer numbers use `integer`.

- Fix `random integer` to `random int` tests
  - Forgot in #10520
- Use int instead of integer in error messages
- Use int type name in bits commands
- Fix messages in `for` examples
- Use int typename in `into` commands
- Use int typename in rest of commands
- Report errors in `nu-protocol` with int typename

Work for #10332 

# User-Facing Changes
User errorrs should now use `int` so you can easily find the necessary
commands or type annotations.

# Tests + Formatting
Only two tests found that needed updating
amtoine added a commit that referenced this pull request Oct 19, 2023
related to
- #10520

# Description
this PR is a followup to #10520
and removes the `random integer` command completely, in favor of `random
int`.

# User-Facing Changes
`random integer` has been fully moved to `random int`
```nushell
> random integer 0..1
Error: nu::parser::extra_positional

  × Extra positional argument.
   ╭─[entry #1:1:1]
 1 │ random integer 0..1
   ·        ───┬───
   ·           ╰── extra positional argument
   ╰────
  help: Usage: random
```

# Tests + Formatting
tests have been moved from
`crates/nu-command/tests/commands/random/integer.rs` to
`crates/nu-command/tests/commands/random/int.rs`

# After Submitting
mention in 0.87.0 release notes
gaetschwartz pushed a commit to gaetschwartz/nushell that referenced this pull request Oct 20, 2023
related to
- nushell#10520

# Description
this PR is a followup to nushell#10520
and removes the `random integer` command completely, in favor of `random
int`.

# User-Facing Changes
`random integer` has been fully moved to `random int`
```nushell
> random integer 0..1
Error: nu::parser::extra_positional

  × Extra positional argument.
   ╭─[entry nushell#1:1:1]
 1 │ random integer 0..1
   ·        ───┬───
   ·           ╰── extra positional argument
   ╰────
  help: Usage: random
```

# Tests + Formatting
tests have been moved from
`crates/nu-command/tests/commands/random/integer.rs` to
`crates/nu-command/tests/commands/random/int.rs`

# After Submitting
mention in 0.87.0 release notes
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
# Description
Consistently use `int` for types and commands

h/t @1Kinoti

Work for nushell#10332

# User-Facing Changes
Deprecate `random integer` in the next release

New command `random int`

# Tests + Formatting
(-)
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
# Description
When referring to the type use `int` consistently. Only when referring
to the concept of integer numbers use `integer`.

- Fix `random integer` to `random int` tests
  - Forgot in nushell#10520
- Use int instead of integer in error messages
- Use int type name in bits commands
- Fix messages in `for` examples
- Use int typename in `into` commands
- Use int typename in rest of commands
- Report errors in `nu-protocol` with int typename

Work for nushell#10332 

# User-Facing Changes
User errorrs should now use `int` so you can easily find the necessary
commands or type annotations.

# Tests + Formatting
Only two tests found that needed updating
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
related to
- nushell#10520

# Description
this PR is a followup to nushell#10520
and removes the `random integer` command completely, in favor of `random
int`.

# User-Facing Changes
`random integer` has been fully moved to `random int`
```nushell
> random integer 0..1
Error: nu::parser::extra_positional

  × Extra positional argument.
   ╭─[entry #1:1:1]
 1 │ random integer 0..1
   ·        ───┬───
   ·           ╰── extra positional argument
   ╰────
  help: Usage: random
```

# Tests + Formatting
tests have been moved from
`crates/nu-command/tests/commands/random/integer.rs` to
`crates/nu-command/tests/commands/random/int.rs`

# After Submitting
mention in 0.87.0 release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:deprecation Related to the deprecation of commands/features/options notes:mention Include the release notes summary in the "Hall of Fame" section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant