Skip to content

Compile / sbt.Keys.packageBin := bundle.value can cause infinite recursive loop #104

@mdedetrich

Description

@mdedetrich

As a consequence of #95, its possible to create an infinite recursive loop which means that sbt never ends up fully starting.

To reproduce this, simply change https://github.com/sbt/sbt-osgi/blob/main/src/main/scala/com/typesafe/sbt/osgi/SbtOsgi.scala#L47 to (fullClasspath in Compile).value.map(_.data) and then navigate into src/sbt-test/sbt-osgi/test-05-exportJars/ to run the test (i.e. run sbt osgiBundle).

You will notice that sbt stalls forever, failing to start. My suspicion is that there is an interdependency between

Which causes the sbt task graph to not complete when evaluated. Apparently the intention of #95 was to prevent asynchronicity issues (see #79 (comment)) by forcefully evaluating Compile / sbt.Keys.packageBin.

@romainreuillon Maybe there is a better way to solve this otherwise I think I would have to revert the change since you can easily prevent sbt from even starting.

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