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)
- Conditional/Delayed Eviction HOT 1
- Update documentation HOT 1
- Flaky test `cht::segment::tests::drop_many_values` under Cargo Tarpaulin HOT 1
- high resource usage in the housekeeper HOT 10
- Bug in `moka::future::Cache::invalidate_all`? Elements not being invalidated immediatelly. HOT 3
- feat: Notifications on eviction, etc. HOT 1
- Vulnerable to CVE-2022-23639? HOT 7
- Implications of `Arc<K>: Borrow<Q>` HOT 2
- dash Cache has no `get_with` HOT 2
- CI: Run Linux AArch64 tests on real hardware HOT 3
- Memory leak after `moka::sync::Cache` is dropped HOT 4
- Moka counter & multiple cache integration HOT 3
- cache line optimized CountMin4
- Add new api similar to `try_get_with`, but return `Option` rather than `Result`? HOT 6
- Is it worth to modify the key of `get_with` as a `&K` rather than `K`? HOT 10
- Help with size based eviction that weighs with bytes HOT 2
- moka is too polymorphic (cargo-llvm-lines) HOT 3
- Setting number of segments will disable notifications HOT 2
- try_get_with always runs init future HOT 4
- Staggering expiry with TTL 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.