`Refresh using native hooks or polling` causing rebuilds for changes in java output folders
Let's make sure issue is not already fixed in latest builds first.
- [x] I verified I can reproduce this issue against latest Integration Build of Eclipse SDK
Steps to reproduce
From a fresh installation and clean workspace:
- Check the
Refresh using native hooks or pollingworkspace setting - Create a large Java project containing many programs, that will take several seconds to build.
- Do a clean
- Add a text file into the
/binof the java project - Watch Eclipse try to rebuild the java project
I tried
- Unchecking
Refresh using native hooks or pollingsolves the problems.
I expected: Changes within Java output directories to be ignored, as per project settings
But got: Changes in Java output folders, with this setting on causes rebuilds. And for larger java projects, while a build is happening, the next poll kicks in because its been updating /bin, stops the current build and starts another, causing a build loop.
Here is some relevant log output
N/A
Tested under this environment:
- OS & version: Windows 10
- Eclipse IDE/Platform version (as shown in Help > About): 4.23, and tested on 2023-12
Community
- [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
This does not feel like an important use-case to me, but feel free to suggest an Improvement as Pull Request.
Which project setting "to ignore changes within Java directories" are we talking about? I'm not aware of such an option. Can you add a screenshot or describe a path of menu items etc.?
This does not feel like an important use-case to me
So improving or ensuring the overall performance of the Eclipse platform is not an important use case?
I'm also having an issue with Refresh using native hooks or polling on Mac OS (Apple Silicon). It seems that Eclipse can't use native hooks and is using polling instead, as the console shows that a refresh and full rebuild occurs approximately every 10 seconds (= a hard coded polling interval?) even if no resource has changed.
Rebuilding the whole projects in my workspace every 10 seconds (even if nothing has changed) isn't very performant.
Typically, the user expects a rebuild to occur only when a resource has changed, not when nothing has changed—a rebuild doesn't make sense if nothing has changed.
I'm also having this issue
So outside of Eclipse you copy files every 10 secomds to the output folders of Java projects and with polling enabled you see rebuilds after the copy? If so, I agree this is not mainstream use case.
If you have different steps ro reproduce, please describe them in detail.
So outside of Eclipse you copy files every 10 secomds to the output folders of Java projects and with polling enabled you see rebuilds after the copy?
Oh no. That's not exactly my use case. My use case is this:
- Enable
Refresh using native hooks or polling - Wait and do nothing in the IDE while Eclipse refreshes and rebuilds approximately every 10 seconds, even if no resource (inside or outside of Eclipse) has been changed, deleted or added.
So outside of Eclipse you copy files every 10 secomds to the output folders of Java projects and with polling enabled you see rebuilds after the copy?
Oh no. That's not exactly my use case. My use case is this:
- Enable "Refresh using native hooks or polling"
- Wait and do nothing in the IDE while Eclipse refreshes and rebuilds approximately every 10 seconds, even if no resource (inside or outside) of Eclipse has been changed.
So most likely it is different issue then.
- Are you sure the other programs running in parallel do not modify or touch files in Eclipse workspace?
- How many projects do you have, are they all rebuilt or subset only?
- Do you have nested projects?
- Are there any errors in the log?
- Do you have some "external" builders on prokects in question? Sometimes they don't properly refresh workspace after changes.
- If you have multiple projects, can you close some of them to see which might be related to the rebuilds?
I find the real reason, it is indeed another issue but only happens when Enable Refresh using native hooks or polling is enabled.
See https://github.com/victools/jsonschema-generator/issues/538 - I also added a reproducer so you can test it yourself.