Forcefully re-resolve a stale PDE target definition

Occasionally Eclipse PDE gets stuck in an error state when it tries to resolve a target definition, e.g. caused by an intermittent network issues. Once it's gotten into this state, it's impossible to forcefully resolve the target definition. p2's clever cache is very persistently saving bandwidth and thus answering every request by the stale and erroneous on-disk cache.

To still re-resolve a stale PDE target definition, one has to remove the following workspace folders and restart the Eclipse IDE:

/path/to/workspace/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool /path/to/workspace/.metadata/.plugins/org.eclipse.pde.core/.p2/org.eclipse.equinox.p2.engine/profileRegistry

Unfortunately, bug #441190 supposed to fix this problem in PDE, is a mere workaround. It simply increments the target's sequence number to invalidate p2's internal cache. This is going to create a new version of the .target file on every click on the reload button. A mess when it's SCM controlled.

...cache invalidation: one of the hard problems in computer science.

Want to comment? Send me an email to blog-comments-2018 at lemmster d.t de and I'll paste it here (I won't publish your address). Why don't you use an external comment service like disqus, you ask? Well, I like to keep this site under my control, comments included. You can use markdown to format your comment.