Skip to content

Conversation

@MichaelChirico
Copy link
Collaborator

@MichaelChirico MichaelChirico commented Jan 2, 2026

Closes #47

(committed by mistake directly to main: a51cf9d)

@MichaelChirico MichaelChirico marked this pull request as ready for review January 4, 2026 21:25
@MichaelChirico
Copy link
Collaborator Author

Here are the 47 failures of the updated suite on main. Most important to look at are cases where the value differs vs. main -- cases where main errors but this branch does not are not a back-compatibility concern.

Details
── Error (test-seq.R:5:5): seq method works analogously to integer: 1 argument (except along.with); n=0 ──
Error in `seq.integer64(n64)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(seq(n64), as.integer64(seq(n))) at test-seq.R:5:5
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n64)
 6. └─bit64::seq.integer64(n64)

── Error (test-seq.R:5:5): seq method works analogously to integer: 1 argument (except along.with); n=5 ──
Error in `seq.integer64(n64)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(seq(n64), as.integer64(seq(n))) at test-seq.R:5:5
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n64)
 6. └─bit64::seq.integer64(n64)

── Error (test-seq.R:5:5): seq method works analogously to integer: 1 argument (except along.with); n=-1 ──
Error in `seq.integer64(n64)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(seq(n64), as.integer64(seq(n))) at test-seq.R:5:5
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n64)
 6. └─bit64::seq.integer64(n64)

── Error (test-seq.R:30:7): seq method works analogously to integer: 2 arguments (except along.with) n1=0, n2=0 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, by = n2), err_msg, fixed = TRUE) at test-seq.R:30:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:30:7): seq method works analogously to integer: 2 arguments (except along.with) n1=5, n2=0 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, by = n2), err_msg, fixed = TRUE) at test-seq.R:30:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:30:7): seq method works analogously to integer: 2 arguments (except along.with) n1=-1, n2=0 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, by = n2), err_msg, fixed = TRUE) at test-seq.R:30:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:33:7): seq method works analogously to integer: 2 arguments (except along.with) n1=0, n2=5 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:33:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, by = n2)
 6. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:38:7): seq method works analogously to integer: 2 arguments (except along.with) n1=5, n2=5 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(...) at test-seq.R:38:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:33:7): seq method works analogously to integer: 2 arguments (except along.with) n1=-1, n2=5 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:33:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, by = n2)
 6. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:38:7): seq method works analogously to integer: 2 arguments (except along.with) n1=0, n2=-1 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(...) at test-seq.R:38:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:33:7): seq method works analogously to integer: 2 arguments (except along.with) n1=5, n2=-1 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:33:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, by = n2)
 6. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:38:7): seq method works analogously to integer: 2 arguments (except along.with) n1=-1, n2=-1 ──
Error in `seq.integer64(n1_64, by = n2)`: not enough information provided
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(...) at test-seq.R:38:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, by = n2)
 9. └─bit64::seq.integer64(n1_64, by = n2)

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=0, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=0, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=5, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=5, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=-1, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=-1, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=0 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Failure (test-seq.R:88:9): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "0" "1" "2" "3" "4"
`expected`: "0" "0" "0" "0" "0"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:88:9

── Failure (test-seq.R:89:9): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "0" "1" "2" "3" "4"
`expected`: "0" "0" "0" "0" "0"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:89:9

── Failure (test-seq.R:90:9): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "0" "1" "2" "3" "4"
`expected`: "0" "0" "0" "0" "0"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:90:9

── Failure (test-seq.R:91:9): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "0" "1" "2" "3" "4"
`expected`: "0" "0" "0" "0" "0"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:91:9

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=0, n3=5 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Failure (test-seq.R:88:9): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "5" "6" "7" "8" "9"
`expected`: "5" "5" "5" "5" "5"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:88:9

── Failure (test-seq.R:89:9): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "5" "6" "7" "8" "9"
`expected`: "5" "5" "5" "5" "5"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:89:9

── Failure (test-seq.R:90:9): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "5" "6" "7" "8" "9"
`expected`: "5" "5" "5" "5" "5"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:90:9

── Failure (test-seq.R:91:9): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "5" "6" "7" "8" "9"
`expected`: "5" "5" "5" "5" "5"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:91:9

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=-1, n3=5 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=-1, n3=5 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Failure (test-seq.R:88:9): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "-1" " 0" " 1" " 2" " 3"
`expected`: "-1" "-1" "-1" "-1" "-1"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:88:9

── Failure (test-seq.R:89:9): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "-1" " 0" " 1" " 2" " 3"
`expected`: "-1" "-1" "-1" "-1" "-1"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:89:9

── Failure (test-seq.R:90:9): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=5 ──
Expected `seq(n1_64, n2, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "-1" " 0" " 1" " 2" " 3"
`expected`: "-1" "-1" "-1" "-1" "-1"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:90:9

── Failure (test-seq.R:91:9): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=5 ──
Expected `seq(n1_64, n2_64, length.out = n3_64)` to be identical to `as.integer64(seq(n1, n2, length.out = n3))`.
Differences:
`actual`:   "-1" " 0" " 1" " 2" " 3"
`expected`: "-1" "-1" "-1" "-1" "-1"

Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. └─testthat::expect_identical(...) at test-seq.R:91:9

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=0, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:82:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=0, n3=-1 ──
Error in `double(as.integer(length.out))`: invalid 'length' argument
Backtrace:
     ▆
  1. ├─rlang::eval_tidy(code, args)
  2. ├─testthat::expect_error(...) at test-seq.R:82:7
  3. │ └─testthat:::expect_condition_matching_(...)
  4. │   └─testthat:::quasi_capture(...)
  5. │     ├─testthat (local) .capture(...)
  6. │     │ └─base::withCallingHandlers(...)
  7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  8. ├─base::seq(n1_64, n2, length.out = n3)
  9. └─bit64::seq.integer64(n1_64, n2, length.out = n3)
 10.   └─base::double(as.integer(length.out)) at bit64/R/integer64.R:1073:3

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=0, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=5, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=5, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:77:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=5, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_error(seq(n1_64, n2, by = n3), err_msg, fixed = TRUE) at test-seq.R:77:7
 3. │ └─testthat:::expect_condition_matching_(...)
 4. │   └─testthat:::quasi_capture(...)
 5. │     ├─testthat (local) .capture(...)
 6. │     │ └─base::withCallingHandlers(...)
 7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 8. ├─base::seq(n1_64, n2, by = n3)
 9. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Error (test-seq.R:82:7): seq method works analogously to integer: 3 arguments (except along.with) n1=0, n2=-1, n3=-1 ──
Error in `double(as.integer(length.out))`: invalid 'length' argument
Backtrace:
     ▆
  1. ├─rlang::eval_tidy(code, args)
  2. ├─testthat::expect_error(...) at test-seq.R:82:7
  3. │ └─testthat:::expect_condition_matching_(...)
  4. │   └─testthat:::quasi_capture(...)
  5. │     ├─testthat (local) .capture(...)
  6. │     │ └─base::withCallingHandlers(...)
  7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  8. ├─base::seq(n1_64, n2, length.out = n3)
  9. └─bit64::seq.integer64(n1_64, n2, length.out = n3)
 10.   └─base::double(as.integer(length.out)) at bit64/R/integer64.R:1073:3

── Error (test-seq.R:82:7): seq method works analogously to integer: 3 arguments (except along.with) n1=5, n2=-1, n3=-1 ──
Error in `double(as.integer(length.out))`: invalid 'length' argument
Backtrace:
     ▆
  1. ├─rlang::eval_tidy(code, args)
  2. ├─testthat::expect_error(...) at test-seq.R:82:7
  3. │ └─testthat:::expect_condition_matching_(...)
  4. │   └─testthat:::quasi_capture(...)
  5. │     ├─testthat (local) .capture(...)
  6. │     │ └─base::withCallingHandlers(...)
  7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  8. ├─base::seq(n1_64, n2, length.out = n3)
  9. └─bit64::seq.integer64(n1_64, n2, length.out = n3)
 10.   └─base::double(as.integer(length.out)) at bit64/R/integer64.R:1073:3

── Error (test-seq.R:71:7): seq method works analogously to integer: 3 arguments (except along.with) n1=-1, n2=-1, n3=-1 ──
Error in `seq.integer64(n1_64, n2, by = n3)`: wrong sign of 'by' argument
Backtrace:
    ▆
 1. ├─rlang::eval_tidy(code, args)
 2. ├─testthat::expect_identical(...) at test-seq.R:71:7
 3. │ └─testthat::quasi_label(enquo(object), label)
 4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 5. ├─base::seq(n1_64, n2, by = n3)
 6. └─bit64::seq.integer64(n1_64, n2, by = n3)

── Failure (test-seq.R:111:3): seq method works analogously to integer: 4 arguments ──
Expected `seq(n, n, by = n, length.out = n)` to throw a error.

── Failure (test-seq.R:112:3): seq method works analogously to integer: 4 arguments ──
Expected `seq(n, n, by = n, along.with = n)` to throw a error.
[ FAIL 47 | WARN 0 | SKIP 0 | PASS 102 ]

@MichaelChirico
Copy link
Collaborator Author

MichaelChirico commented Jan 5, 2026

Analysis (using 1LL to be as.integer64(1) for conciseness)

Here are changes to error cases on main

  • On main, seq(1LL, 1, 1, 1) is not an error. I think it's fine to break compatibility here.
  • On main, seq(1LL, 1, by=-1) is an error. by= doesn't matter if to==from.
  • This branch improves the error message for seq(1LL, 10, by=-1) (Error in double(as.integer(length.out)) : invalid 'length' argument to 'length.out' must be a non-negative")
  • This branch makes a minor edit to error message of seq(1LL, -1, by=1) (wrong sign of 'by' argument to wrong sign in 'by' argument)
  • This branch syncs the error message of seq(1LL, 2, by=0) (wrong sign of 'by' argument to invalid '(to - from)/by')
  • This branch assumes from=1 and to=1 in seq(10LL, by=-1), seq(to=10LL, by=1), seq(10LL), and seq(by = 3LL) which matches seq(). Also that seq(1LL, length.out=50L) means 1LL:50LL, and seq(to=50LL, length.out=50L) means the same.
  • seq(1LL, by=8, length.out=0) now gives an empty return
  • seq(to = -1LL) gave an error

Here are changes to actual output values:

seq.integer64() would ignore from/to for an implied constant sequence of specified length:

one = as.integer64(1)

seq(1, 1, length.out=10) # rep(1, 10)
seq(one, one, length.out=10) # main: 1LL:10LL; this branch: rep(1LL, 10L)

seq.integer64() would ignore length.out=0

## two arguments
seq(to=5, length.out=0) # integer()
seq(to=as.integer64(5L), length.out=0) # main: 1LL:5LL; this branch: integer64()

## three arguments
seq(5, 4, length.out=0) # integer()
seq(one, 2, length.out=0L) # main: 1LL:2LL; this branch: integer64()

seq.integer64(to = 0LL) gives empty output

seq(to = 0) # 1:0
seq(to = as.integer64(0L)) # main: integer64(); this branch: 1LL:0LL

@MichaelChirico
Copy link
Collaborator Author

Need some more tests for double inputs:

seq(as.integer64(1), 20, by=1.5)

## main
# integer64
#  [1] 1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20

## this PR
# integer64
#  [1] 1  2  3  4  5  6  7  8  9  10 11 12 13

Also more skipped cases, for now, related to mixed integer64+double arithmetic.
@MichaelChirico MichaelChirico changed the title Fix seq(a, b, length.out=n) Overhaul seq() to be more full-featured and less buggy Jan 5, 2026
@MichaelChirico MichaelChirico merged commit 5811cba into main Jan 5, 2026
8 checks passed
@MichaelChirico MichaelChirico deleted the seq-length-out branch January 5, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seq(length.out=) is incorrect

2 participants