eclipse / buildship

The Eclipse Plug-ins for Gradle project.
528 stars 167 forks source link

Gradle tasks fail to load upon Eclipse start, manual refresh works as expected #1298

Open vredez opened 4 months ago

vredez commented 4 months ago

Expected Behavior

Current Behavior

Steps to Reproduce

Your Environment

oleosterhagen commented 3 months ago

With https://github.com/eclipse/buildship/pull/1240 (commit: https://github.com/eclipse/buildship/commit/dcdf121d6356bed9c7278a3023d8263aeaf3c61a) the fetch strategy has been changed when populating the Gradle Tasks view. Before the change this has been LOAD_IF_NOT_CACHED. Now it is FROM_CACHE_ONLY.

Here is the relevant comment from the code:

// set initial content (use fetch strategy FROM_CACHE_ONLY as we don't want to enforce // a potentially expensive sync operation just because a view was opened)

So, this behavior is intentional.

One possible solution could be the introduction of a new preference option Refresh tasks when opening the Tasks View. When checked, the task view will always be populated when it is opened.

vredez commented 2 months ago

Good to know that this is desired behavior. From a users perspective it really seems like a bug though, for two reasons:

I can see the benefits of not loading the tasks automatically (especially since Eclipse gets slower every release anyways), but maybe a better indication of "not yet loaded" tasks could be implemented (question mark instead of error indicator for example).