Skip to content
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

Dependency to io.reactivex.rxjava3.internal packages #253

Closed
scottslewis opened this issue Aug 24, 2021 · 5 comments
Closed

Dependency to io.reactivex.rxjava3.internal packages #253

scottslewis opened this issue Aug 24, 2021 · 5 comments

Comments

@scottslewis
Copy link
Collaborator

scottslewis commented Aug 24, 2021

In using the new rxjava3 support (in osgi framework) I discovered that there is a dependency on these two rxjava3 packages:

There is a dependency in the rx3java-stub (and some test code) on the following two reactivex packages

io.reactivex.rxjava3.internal.fuseable
io.reactivex.rxjava3.internal.queable

The current version of rxjava3 (3.1.0 located here in maven central: https://search.maven.org/artifact/io.reactivex.rxjava3/rxjava/3.1.0/jar

does not export these packages in the manifest.mf created by bnd, and in fact lists them under Private-Package. This means that even though these two packages can be accessed at runtime in java app environment, and by the compiler, they cannot be accessed (resolved) when run in osgi framework...since the osgi classloader cannot see packages that are declared private by the io.reactivex.rxjava3 bundle.

With casual inspection in the rx3java-stub code (not test code) that it may be possible to remove the references to the classes in the internal packages (several accesses are just to constants). I will give a shot at this.

@scottslewis
Copy link
Collaborator Author

FYI I've opened this issue for rxjava3 api:

ReactiveX/RxJava#7318

If RxJava folks refuse to make changes to manifest (IMHO they've made a couple of strange decisions wrt internal classes and they should either correct those strange decisions or make these internal.* packages exported in their manifest) it is possible to simply reproduce the reactive-grpc-required internal.fuseable and internal.queuable classes into a (new) package in the com.salesforce namespace.

My hope is that's not necessary, but I have tried it (last night) and it shouldn't be a big problem to do if necessary. Let's see how ReactiveX/RxJava#7318 comes out.

@rmichela
Copy link
Collaborator

Looks like RxJava3 fixed this for 3.1. We'll have to update the dependency when it becomes available upstream.

@scottslewis
Copy link
Collaborator Author

Yes. I haven't looked closely yet at API changes, but I suspect that there may be a couple stray dependencies (i.e. internal.util.Functions) that need to be removed from stray test code. When it becomes available upstream I will prepare any needed changes (probably just reproduce the needed classes/methods in the com.salesforce package namespace). In mean time,I'm watching issue ReactiveX/RxJava#7324

@scottslewis
Copy link
Collaborator Author

With changes to internal packages, rxjava3 3.1.1 is now out at maven central and ReactiveX/RxJava#7324 is now closed.

I've opened pull request to remove the .internal. package references to rxjava3, update the rxjava3 dependency to 3.1.1 and update the reactivex-grpc version to 1.2.1. Please see pr #254

@rmichela
Copy link
Collaborator

rmichela commented Oct 10, 2021

Released in 1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants