Skip to content

Update Rust crate moka to v0.7.0 #4405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 4, 2022
Merged

Update Rust crate moka to v0.7.0 #4405

merged 2 commits into from
Jan 4, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 4, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
moka dependencies minor =0.6.3 -> =0.7.0

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@tatsuya6502
Copy link
Contributor

Hi. Thank you for using Moka.

This error in the CI is due to a breaking change in Moka v0.7.0 API:

error[E0308]: mismatched types
   --> src/app.rs:158:51
    |
158 |         let version_id_cacher = CacheBuilder::new(config.version_id_cache_size)
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
    |
help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
    |
158 |         let version_id_cacher = CacheBuilder::new(config.version_id_cache_size.try_into().unwrap())
    |                                                                               ++++++++++++++++++++

https://github.com/moka-rs/moka/blob/master/CHANGELOG.md#version-070

Version 0.7.0

Breaking change: The type of the max_capacity has been changed from usize to u64. This was necessary to have the weight-based cache management consistent across different CPU architectures.

Added

  • Add support for weight-based (size aware) cache management. (#24)
  • Add support for unbound cache. (#24)

Sorry for the inconvenience, but please change config.version_id_cache_size to u64.

Thanks!

@Turbo87
Copy link
Member

Turbo87 commented Jan 4, 2022

thanks for reaching out, @tatsuya6502 and thanks again for the awesome crate :)

I'll adjust this later tonight, or whenever I find the time 😅

@Turbo87
Copy link
Member

Turbo87 commented Jan 4, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2022

📌 Commit 900b3e0 has been approved by Turbo87

@bors
Copy link
Contributor

bors commented Jan 4, 2022

⌛ Testing commit 900b3e0 with merge 00b0c64...

@bors
Copy link
Contributor

bors commented Jan 4, 2022

☀️ Test successful - checks-actions
Approved by: Turbo87
Pushing 00b0c64 to master...

@bors bors merged commit 00b0c64 into master Jan 4, 2022
@bors bors deleted the renovate/moka-0.x branch January 4, 2022 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants