Giter Club home page Giter Club logo

Comments (5)

pkriens avatar pkriens commented on August 18, 2024

In the ./okhttp/okhttp-coroutines project directory there is no source in the okhttp.coroutines package but there are sources in the okhttp package. In the whole repository, I can't find a single kotlin file that declares the okhttp.coroutines package?

okhttp/okhttp-coroutines ((parent-5.0.0-alpha.13) *)$ ls -R src
src/main/kotlin/okhttp3:
JvmCallExtensions.kt
src/test/kotlin/okhttp3:
SuspendCallTest.kt
okhttp/okhttp-coroutines ((parent-5.0.0-alpha.13) *)$ cd ..
okhttp ((parent-5.0.0-alpha.13) *)$ find . -name "*.kt" -exec grep okhttp.coroutines {} \;
okhttp ((parent-5.0.0-alpha.13) *)

This does not seem to look right, does it?

from bnd.

swankjesse avatar swankjesse commented on August 18, 2024

Yep. We’ve since moved the code to that and package.

from bnd.

pkriens avatar pkriens commented on August 18, 2024

The problem seems to be that if you do split packages, bnd will turn merge them.

The parent-5.0.0-alpha.13 branch has 1 class in the okhttp package: src/main/kotlin/okhttp3/JvmCallExtensions.kt. This will then include ALL classes from the class path in that package since split packages don't work in OSGi without a lot of work and they are evil anyway :-)

If I remove the src/main/kotlin/okhttp3/JvmCallExtensions.kt I get an empty bundle, as expected.

The fact that you do not get an error on the superfluous Export-Package is that sometimes you need to export a package even if you don't have it. When you'd use wildcards it would've warned you.

So I do not think this is a bug. Do not have packages in your source tree that overlap with packages on the build path and you should be ok?

from bnd.

swankjesse avatar swankjesse commented on August 18, 2024

It’s a surprising result but it’s not causing us problems any more.

from bnd.

pkriens avatar pkriens commented on August 18, 2024

In bnd, the default always was the classpath, not the project's sources. This made it easy to assemble bundles with their APIs and subsets. However, in this case we have some unexpected interaction. Although I guess it made you find a real problem :-)

from bnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.