Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vredez opened this issue Apr 5, 2024 · 2 comments

Comments

@vredez
Copy link

vredez commented Apr 5, 2024

Expected Behavior

  • Open workspace with Gradle project
  • Gradle tasks are loaded successfully

Current Behavior

  • Open workspace with Gradle project
  • Gradle tasks are not loaded (error icon is shown within the view Gradle Tasks)
  • Tasks load just fine when performing a manual refresh of Gradle tasks

Steps to Reproduce

  • create a new empty Gradle project
  • exit Eclipse
  • start Eclipse and reopen workspace --> Gradle tasks fail to load

Your Environment

  • Eclipse Buildship 3.1.9.v20240115-1636
  • Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
    Version: 2024-03 (4.31.0)
    Build id: 20240307-1437
  • vanilla eclipse.ini
  • Windows 11 21H2
@oleosterhagen
Copy link
Contributor

oleosterhagen commented May 18, 2024

With #1240 (commit: dcdf121) 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
Copy link
Author

vredez commented May 20, 2024

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

  • Error icon is shown initially (which is the same as if errors occurred)
  • Undocumented change of behavior w.r.t. prior releases

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants