Thomas Eizinger
d7363a53d3
fix: Remove circular dependencies across workspace ( #3023 )
...
Circular dependencies are problematic in several ways:
- They result in cognitive overhead for developers, in trying to figure out what depends on what.
- They present `cargo` with limits in what order the crates can be compiled in.
- They invalidate build caches unnecessarily thus forcing `cargo` to rebuild certain crates.
- They cause problems with tooling such as `release-please`.
To actually break the circular dependencies, this patch inlines the uses of `development_transport` in the examples and tests for all sub-crates. This is only meant to be a short-term fix until https://github.com/libp2p/rust-libp2p/issues/3111 and https://github.com/libp2p/rust-libp2p/pull/2888 are fixed.
To ensure we don't accidentally reintroduce this dependency, we add a basic CI that queries `cargo metadata` using `jq`.
Resolves https://github.com/libp2p/rust-libp2p/issues/3053 .
Fixes https://github.com/libp2p/rust-libp2p/issues/3223 .
Related: https://github.com/libp2p/rust-libp2p/pull/2918#discussion_r976514245
Related: https://github.com/googleapis/release-please/issues/1662
2022-12-12 20:58:01 +00:00
João Oliveira
3df3c88f3d
swarm/behaviour: Replace inject_*
with on_event
( #3011 )
2022-11-17 09:28:40 +00:00
Hannes
d5ea93dd71
feat(swarm): Make executor for connection tasks explicit ( #3097 )
...
Previously, the executor for connection tasks silently defaulted to a `futures::executor::ThreadPool`. This causes issues such as https://github.com/libp2p/rust-libp2p/issues/2230 .
With this patch, we force the user to choose, which executor they want to run the connection tasks on which results in overall simpler API with less footguns.
Closes #3068 .
2022-11-15 14:26:03 +00:00
efarg
ba14ffdd42
protocols/identify: Change default cache_size of Config to 100 ( #2995 )
...
`Config` struct's member `cache_size` now defaults to `100`.
2022-11-04 19:40:30 +00:00
Thomas Eizinger
4d1b165982
transports/tcp: Unify symbol naming ( #2961 )
...
Co-authored-by: Elena Frank <elena.frank@protonmail.com>
2022-10-24 15:41:08 +11:00
Thomas Eizinger
1b793242e6
.cargo: Run clippy
on ALL the source files ( #2949 )
2022-10-04 18:24:38 +11:00
João Oliveira
a7a96e5502
protocols/identify: Revise symbol naming ( #2927 )
2022-10-04 11:17:31 +11:00