Skip to content

OSGi -split-package:=first seems unsafe #97

@lrytz

Description

@lrytz

I took the current master branch of this repo and ran in sbt 1. show core/package and 2. core/publishLocal on my machine. When comparing the content of the jars, the publish one includes includes the wrong classfiles in the scala/collection/ package, it's the classes of the standard library instead of those in the module.

Diff is here: https://gist.github.com/lrytz/96e397595a4be5fbfe7a9b80baf48f28/revisions

It seems the assumption mentioned here is not correct:

// The first entry on the classpath is the project's target classes dir but sbt-osgi also passes all
// dependencies to bnd. Any "merge" strategy for split packages would include the classes from scala-library.

I think this is pretty risky, and we should probably disable OSGi support if noone knows a better solution. cc @SethTisue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions