Comments (10)
Closing this issue as the next
branch was merged into the master
branch.
I will run some pre-release testing, and if everything goes well, I will publish Moka v0.9.0 to crates.io.
from moka.
Hi. Thank you for the offer. Well, all these dependencies are in-use, of course. However if you only use moka::dash::Cache
in serenity
, you could remove the following dependencies from moka
:
crossbeam-epoch
uuid
thiserror
(butserenity
already depends on it)
To do that, you will need the followings:
- Add a crate feature called
sync
toCargo.toml
, and add it to the default features. - In
Cargo.toml
, make the following dependencies optional, and enable them only whensync
orfuture
feature is specified:crossbeam-epoch
uuid
thiserror
- Make the following modules enabled only when
sync
feature is specified: (Use#[cfg(feature="sync")]
)sync::builder
sync::cache
sync::segments
sync::value_initializer
- Make the following modules enabled only when
sync
orfuture
feature is specified: (Use#[cfg(any(feature="sync", feature="future"))]
)sync
cht
common::error
(I have not tried above by myself. So there may be additional changes required)
Once done, and a new version of moka
is published to crate.io, you will update moka
dependency in serenity
to the followings:
serenity
's Cargo.toml
[dependencies.moka]
version = "0.9"
default-features = false
features = ["dash", "atomic64", "quanta"]
optional = true
Also I found that scheduled-thread-pool v0.2.5
uses an older version of parking_lot
(v0.11.2
). serenity
already depends on parking_lot
but a newer version (v0.12.0
). I see the master
branch of sfackler/scheduled-thread-pool has it already upgraded to v0.12
via sfackler/scheduled-thread-pool#15, but no new version of scheduled-thread-pool
has been published to crates.io.
So could you please open a GitHub issue to sfackler/scheduled-thread-pool and ask them to publish a new version to crates.io?
Thanks!
from moka.
Yeah. I will take it over as I will need to move some modules around. I merged #141 into a new topic branch gh141-optout-sync.
from moka.
OK. I have created two PRs:
I already merged #142, which was for moving some modules around.
#143 is for the sync
feature and contains your commits and my commits. Once merged, disabling the sync
feature (as well as future
feature) will remove the following dependencies from moka
:
crossbeam-epoch
uuid
thiserror
I will come back in a couple of hours to review the PR and will merge it into the next
branch. This branch is for moka
v0.9.0 release, while the master
branch is for v0.8.x releases. I will merge #143 into next
branch because it contains some breaking changes.
Please give me a couple of weeks to develop other stuff for v0.9.0 milestone.
from moka.
I reviewed and merged PR #143 into the next
branch. I will keep this issue open until the PR gets merged into the master
branch.
from moka.
@Milo123459 — I have published Moka v0.9.0 to crates.io 🎉
from moka.
#141 made the pr!
from moka.
Thanks for making the PR #141. Hmm, there are so many compile errors.
After a brief review, I noticed a couple of things:
moka::dash::Cache
actually depends on the following crates, so we cannot remove them:uuid
thiserror
moka::dash::Cache
actually depends on some modules undermoka::sync
, so we cannot simply disable then even though nosync
orfuture
feature are specified:- I would better to do some refactoring: e.g. move these shared modules under a new super module.
Let me take over your stuff and finish it. I will merge #141 into a topic branch and do the rest of the work.
from moka.
Are you sure you want to take it over?
Either way, thank you!
from moka.
I am doing some experiments here in gh141-experiments branch. It is almost working. I will continue working tomorrow as it is midnight now in my timezone.
I found the following is not true:
moka::dash::Cache
actually depends on the following crates, so we cannot remove them:
uuid
thiserror
So I am able to remove uuid
and thiserror
crates when both sync
and future
features are not specified.
from moka.
Related Issues (20)
- Try `seize` as a replacement of `crossbeam-epoch`? HOT 4
- Refactoring: Cache policy implementations HOT 2
- Do not swallow the panic when the eviction listener is panicked
- Crash in iOS HOT 3
- Unable to use moka when miri testing HOT 3
- Inefficient size aware eviction when inserting new entries with larger size HOT 3
- Consider switching to TinyUFO HOT 2
- Pending `run_pending_tasks` may cause busy loop in `schedule_write_op` HOT 14
- Miri errors on the `timer_wheel` module. (Miri v0.1.0 8b2459c1 2024-04-09) HOT 1
- CI: Kani verifier v0.49.0 uses Rust `nightly-2024-03-29`, which cannot compile `[email protected]` HOT 2
- Should Moka work in WASM? HOT 2
- Size Aware Eviction: First-In-First-Out, or evicting largest items first? HOT 2
- Latest triomphe update breaks MSRV
- The `once_cell` dependency should be optional
- Update Key With One Evaluation of the `init` Future HOT 12
- Feature Request: Alternative compute API that skips if other thread/async task is already computing for the key
- Locking `triomphe` is the wrong approach to preserving MSRV HOT 2
- CI: Run Linux arm64 tests only once a week on `arm1.small` instance at AWS CodeBuild
- Use SIEVE as underlying LRU?
- Unexpected behavior with LRU HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moka.