question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JCTools as Shaded Dependency

See original GitHub issue

Now that JCTools is available on Maven Central (http://search.maven.org/#search|ga|1|jctools) we should consider depending on it directly instead of copy/pasting as we have done so far: https://github.com/ReactiveX/RxJava/tree/1.x/src/main/java/rx/internal/util/unsafe (note the README that provides background and details).

There are a few considerations:

  1. RxJava is a “zero dependency” project so the dependency will need to be shaded (package names changed to be inside RxJava) so that it becomes part of the RxJava jar.

  2. Byte size of pulling in code from JCTools that we don’t need. This affects Android particularly.

  3. Use of JCTools must all be done behind a conditional check UnsafeAccess.isUnsafeAvailable() otherwise RxJava will not work on platforms without sun.misc.Unsafe.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:44 (39 by maintainers)

github_iconTop GitHub Comments

1reaction
nitsanwcommented, Jun 18, 2016

@guidomedina please reflect your intended usecase in a JMH benchmark, let the numbers speak 😉

0reactions
akarnokdcommented, Oct 18, 2017

Closing as this will likely not happen for 1.x. Subsequent versions have to use customized versions anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use shaded dependency on JCTools instead of copy and paste
I thought this was not the case, but it appears Netty is using a C&P dependency model. This has some serious flaws, which...
Read more >
io.netty.util.internal.shaded.org.jctools.queues ...
io.netty.util.internal.shaded.org.jctools.queues. ... JAR search and dependency download from the Maven repository. Toggle navigation.
Read more >
JCTools | Java Concurrency Tools - GitHub Pages
JCTools. Java Concurrency Tools for the JVM. This project aims to offer some concurrent data ... Add the latest version as a dependency...
Read more >
What is a "shaded" Java dependency?
Shading dependencies is the process of including and renaming dependencies (thus relocating the classes & rewriting affected bytecode & resources) to create ...
Read more >
java-driver-core-shaded : 4.3.0 - com.datastax.oss
DataStax Java driver for Apache Cassandra(R) - core with shaded deps ... Dependencies: com.datastax.oss:native-protocol · com.datastax.oss:java-driver-shaded- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found