-
Notifications
You must be signed in to change notification settings - Fork 115
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
Loop between "Building" and "Downloading Sources and Javadoc" #252
Comments
It might just be a symptom of #123 |
Yep that seems to be a reincarnation of that bug. As mentioned there, it some time magically 'happens' but goes away without a clear indication why. |
That typically happens when having some Tycho modules (incl tycho-core and most of content of tycho-bundles) open, but not all, and opening a new module. |
Happens for me a lot as well after updating to m2e 1.18.1 - different workspaces, some with Maven modules that are bundles, some only containing regular JAR/WAR/POM Maven modules. |
Downgrading to m2e 0.17.2 seems to fix the issue. |
I merged a patch that may improve things yesterday. Maybe it's also worth trying the latest snapshot of 1.18.2. |
Do you have the update site URL handy? |
I have installed |
@reckart thanks for trying. Do you have a minimal project that can reproduce this issue in a predictable manner? |
Unfortunately not. |
|
I confirm build 1.18.2.20210721-0646 fixed that annoying problem |
I think the actual cause of this problem is that after the sources/javadoc of a project were downloaded that classpath is updated and during the classpath update a download of the attached sources/javadoc is triggered again.
While Mickaels change fixed the problem for the most cases the logic in I'm about to prepare a PR for this. |
+ fix total-work computation in classpath-update + minor clean up
It is exactly what happening to me too, yesterday I've done a full upgrade in my Eclipse STS and m2e now is: and the issue appers systematically |
What would really help more than "me too" would be if someone can share a reproducible example that allows to reproduce the issue deterministically. |
Your version is the latest release. Have you tried to update to the latest snapshot? It can be found in this p2-repo: With the latest snapshot the loop only occurs in the rare situation I have described above, which probably happened to me because I was installing artefacts into my own Maven repo. |
Really thanks @HannesWell, today I've upgraded to m2e 1.18.2.20210826-0749 and that fixed the issue 👍 |
+ fix total-work computation in classpath-update + minor clean up
I just installed Eclipse 09-2021 and this is still happening though. |
I think this is because m2e do not contributed a new release @mickaelistria ? |
Right, m2e was not released since this was fixed; I need to investigate about doing a new release shortly, although IIRC it requires first a new release of Wild Web Developer. |
Regarding a release of m2e I want to mention that the pde integration now automatically converts Maven-targets in a target-platform file into the new format that is more closely to the Maven dependency definition and also supports more elements like repositories. But those Maven-targets are not supported before Tycho 2.5.0 which is currently under development. Therefore I suggest to not release m2e before Tycho 2.5.0 has been released. Otherwise m2e would create target files Tycho cannot handle or users are forced to use Tycho snapshot when they use the latest m2e release. |
I'm still having this problem with Quarkus (even with 1.18.2, fresh Eclipse 2021-09):
|
Where do I get version 1.18.2 or 1.18.3 ? Are not working ... |
You can get them from here:
Those older releases are archived, but still available under the original address. If you open the URLs in the browser you will be re-directed to the archive were you find all releases in the archive. |
Indeed the 1.18.3 does not exist (and then never did). But the 1.18.2 does. If you click on that link you will see the redirect and P2 can work with that directly. |
Using M2E version 2.3.0: I have a jar built with the "maven-install-plugin". It includes both the class jar and a sources jar. Except that the sources jar is badly built (the source is inside a "Classes" folder" inside of the root). When m2e tries to resolve this in the local repository, it leads to an infinite loop. |
@RichMacDonald Thanks. Can you please try to build a minimal project that can reproduce this issue and open a new ticket with the steps to reproduce? |
@mickaelistria Reproducing is problematic: I made a standalone maven project using just the offending jars. Of course, it worked fine. Grrr. This doesn't surprise me. The problem has always been intermittent.
I have tried turning on all the maven configuration settings to refresh everything on startup. I have tried turning them off. The problem occurs in both. If I get lucky on something, I will report back. Otherwise, I am very sorry. No can reproduce. |
Is there any option that can be enabled to log reasons for triggering a rebuild? |
You can use the |
@HannesWell that view sounds helpful. I found it, opened it, and triggered an incremental build by a small change in a file as well as a rebuild using "Maven -> Update project" - but both did not register in the view. Do I need to do anything extra to make the view register builds? |
The view has a "paused" (yellow) icon you need to first enable recordings there. |
@laeubi Ah, thanks! I had actually noticed the pause button, but I did not think that I had to press it. Might be worth considering to open the view in an unpaused mode as to avoid users being confused about the view not doing anything? |
I run into this issue a lot during my work. It mostly happens when I'm working on projects of one big maven project with around 300 modules. I only import the few projects I need and sometimes this whole loop starts. The |
See for a list of useful information in such case, "one big maven project with around 300 modules" is very hard to investigate on :-) Of course you should make sure to use the latest m2e release and maybe can extract some information from the mentioned view what is triggering the rebuild. |
I have one of these large projects (actual several) and while I do not have the infinite build problem right now (I have it sometimes), I can see that the parent module (type pom) of which all other modules are submodules has a very high build count. Opening it, I see that its delta section includes basically all the files from the target folders of submodules. Does that make sense? I mean, if a file is already triggering a delta build of a submodule, should it also trigger a delta build of higher-level reactor modules? |
It depends on the delta, basically m2e assumes that if the parent changes there is a high chance that childs are affected (otherwise one won't reference it as a parent), since the last release m2e has some improvements to not build unnecessarily, but this might need still improvements. |
You say if the parent changes, the child needs to be build - that sounds correct. But if I read the view correctly, then the parent is built because files in the target folders of its submodules change - that seems odd. Maybe I am readying the view wrong - I assume the files listed under the delta section are the triggers for the build and not the files updated by the build. |
Yes these are triggers for a build, but due to the eclipse resource-model m2e will receive deltas for all child items of the parent project so you will see a long list here, but this should not trigger the build as m2e ignores such deltas here if the occur in a submodule: m2e-core/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/MavenBuilderImpl.java Line 185 in 8c838c8
if you can't share your project here, the best bet is to start Eclipse with remote debugging enabled (via |
Sorry for using this as a support/feature request thread... but is there some way of seeing through which way a file was scheduled as a delta trigger? For example, I have some files here in |
Not really, depending on your OS you might want to use native tools to watch this particular file (e.g. inotify https://serverfault.com/a/780522 ), basically if the file is touched (even if content stays the same) it is assumed as a delta. |
I'll update my m2e to the lastest version before making any further observations... what I am seeing now is old behavior. |
By the way, there is one bug in resource plugin itself that make things a bit more worse but it has not gotten much attention yet: |
After upgrading to m2e 2.3.0, numbers in the build view look considerably more sane. Although in many cases, I now see entries that have neither delta nor execution children - so it is unclear what triggered those builds. |
... it also seems that many builds are not recorded anymore at all ... E.g. I see builds happing via the progress view, but they do not seem to be added to the Maven Workspace Build view. |
"build" is not a exclusive m2e term, it could be anything, including java source compiles, verification and so on... |
Ok, but I clearly can see "Invoking Maven Project Builder" flashing through rapidly in the progress view but the "Maven Workspace Build" view does not seem to be updated accordingly. |
For me the "Maven Workspace Build" doesn't show anything. The loop in the "Progress" view is:
Then a few
then
And then it starts over with downloading Javadoc & Sources. If I disable "Build automatically" the "Building" step is gone, but it loops between "Download sources and javadoc" and "JPA Project Change Event Handler". |
While I'm coding for Tycho, on snapshot branch, I see a lot of CPU used by Eclipse IDE and the Progress view seems to loop between "Building" and "Downloading Sources and Javadoc" pretty often.
The text was updated successfully, but these errors were encountered: