nativelink icon indicating copy to clipboard operation
nativelink copied to clipboard

Convert usize to u64 in Store trait APIs

Open boldpulse opened this issue 1 year ago • 3 comments

Description

APIs in StoreLike now uses u64 instead of usize It's because u64 expresses the size of the data, but usize expresses local memory limits.

It includes bunch of files changed.

Fixes #1328

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] This change requires a documentation update

Checklist

  • [x] Updated documentation if needed
  • [x] Tests added/amended
  • [x] bazel test //... passes locally
  • [x] PR is contained in a single commit, using git amend see some docs

This change is Reviewable

boldpulse avatar Sep 10 '24 14:09 boldpulse

Waiting review on this.

cc: @allada, @MarcusSorealheis

boldpulse avatar Sep 10 '24 14:09 boldpulse

Thanks, @allada.

I could see general rule in adding try_from and when to use u64 and usize, from your review. ;) I will update your current opinions as well as other codes based on the general rule.

boldpulse avatar Sep 11 '24 00:09 boldpulse

Rebased changes. Hope you to check this.

cc: @adam-singer, @allada, @MarcusSorealheis

boldpulse avatar Sep 16 '24 02:09 boldpulse