Skip to content

fix: rename SimpleRng::next_u32 to next#64

Merged
pawelrutkaq merged 3 commits intoeclipse-score:mainfrom
Lukasz-Juranek:fix/rename-simple-rng-next-u32
Feb 27, 2026
Merged

fix: rename SimpleRng::next_u32 to next#64
pawelrutkaq merged 3 commits intoeclipse-score:mainfrom
Lukasz-Juranek:fix/rename-simple-rng-next-u32

Conversation

@Lukasz-Juranek
Copy link
Contributor

Summary

  • Renamed SimpleRng::next_u32 to SimpleRng::next in src/kyron/src/time/mod.rs (test-only code)
  • The function returns u64, not u32, making the previous name misleading
  • Updated all 3 call sites: gen_range() and 2 direct usages in fuzzy tests

Test plan

  • bazel test //src/kyron:tests — PASSED before and after fix
  • bazel test //... — all 8 test targets PASSED
  • bazel build //... — full build SUCCESS
  • Format checks (rustfmt, ruff, buildifier, yamlfmt) — all PASSED

Closes #13

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Feb 14, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 7fcee261-300a-435a-9596-86d8cac49d97
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'rules_python', the root module requires module version rules_python@1.4.1, but got rules_python@1.8.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.1.1, but got rules_cc@0.2.14 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.0.3, but got aspect_rules_lint@1.5.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'buildifier_prebuilt', the root module requires module version buildifier_prebuilt@7.3.1, but got buildifier_prebuilt@8.2.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (33 packages loaded, 9 targets configured)

Analyzing: target //:license-check (70 packages loaded, 9 targets configured)

Analyzing: target //:license-check (76 packages loaded, 9 targets configured)

Analyzing: target //:license-check (129 packages loaded, 1148 targets configured)

Analyzing: target //:license-check (133 packages loaded, 2517 targets configured)

Analyzing: target //:license-check (136 packages loaded, 2528 targets configured)

Analyzing: target //:license-check (141 packages loaded, 2577 targets configured)

Analyzing: target //:license-check (141 packages loaded, 2577 targets configured)

INFO: Analyzed target //:license-check (146 packages loaded, 4716 targets configured).
[1 / 1] no actions running
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 209 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[15 / 17] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[16 / 17] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 26.030s, Critical Path: 2.62s
INFO: 17 processes: 12 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

The function returns u64, not u32, making the name misleading.
Rename to `next` to accurately reflect the return type.

Closes eclipse-score#13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

The created documentation from the pull request is available at: docu-html


// Linear Congruential Generator (LCG)
fn next_u32(&mut self) -> u64 {
fn next(&mut self) -> u64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next is clashing with the iterator name and was failing on some clippy. I wonder why it does not clash now. https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.next

maybe next_64 or someother name ?

The name `next` conflicts with Iterator::next and triggers clippy's
should_implement_trait lint. Use next_u64 which accurately reflects the
u64 return type and avoids the naming collision.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Lukasz-Juranek
Copy link
Contributor Author

@pawelrutkaq all green please take a look

@pawelrutkaq pawelrutkaq merged commit 7c0abdc into eclipse-score:main Feb 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: SimpleRng::next_u32 name is invalid

2 participants