Skip to content

[launch] Old bundles being included in Bndtools launch #6580

Open
@kriegfrj

Description

@kriegfrj

Interesting problem:

  • I ran a rusty old test.bndrun (ie, one that I had not run for some time) using the JUnit runner in Bndtools.
  • As the rest of the workspace had evolved since last running it, it failed to launch at first due to missing (old) bundles that were no longer in my workspace, so I had to re-run the resolver.
  • When I ran it, the JUnit activator failed with an odd NPE. When I tried to look up the line in the source I saw that it didn't match the NPE.
  • I ran an lb -s and noticed that several versions of the bnd junit-platform tester were installed in my workspace. On closer inspection I also noticed old versions of the JUnit bundles installed alongside the newer versions that I was actually using.
  • I compared the results of lb -s against my -runbundles and noted that those old extra versions were not in -runbundles.
    • How does a launch get launched with bundles that are not in -runbundles???
  • I suspected there was some caching going on, so I made a copy of test.bndrun and called it test2.bndrun. Upon launching test2.bndrun it ran correctly the first time with the correct set of bundles (ie, no old bundles).
  • I noticed that my Eclipse launch configuration for the original test.bndrun had the Clean storage area before launch option unchecked. I checked it, re-launched, and the problem of the old bundles went away.

I know that the "Clean storage area" is effectively equivalent to the -runkeep option of a bndrun file; however I'm not sure of -runkeep's intended purpose. Whatever its intended purpose, this behaviour of including old bundles that are not in -runbundles does not seem to be correct.

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