-
Notifications
You must be signed in to change notification settings - Fork 139
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
PackageFragmentRoot.getRawClasspathEntry seem to depend on resolved classpath #3534
Comments
The spaghetti code around setting project classpath hits multiple times in org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo.setClasspath() with conditional breakpoint, setting rootPathToRawEntries to null from multiple threads. I can't see any clear logic when it is supposed to be in consistent state and when not. I believe we have to revert #3531. |
Also in our product tests we saw now sporadic test fails (they success on automated repeating) with following stack:
I'm going to revert the change... |
This does not seem urgent. |
Not sure, this one seem to work on resolved path. But we see for sure related indexer errors in different tests which were all green before the PR in question. |
skip this comment- that was me testing issue 3298 |
As mentioned in the other issues, jdt.ui has a job that is run and init al classpath container. After that of course everything is "set" and one will not find a difference. Also there is Maybe the places failing now actually want to use |
I now tried to limit the scope of the map here: this makes the code much safer and requires less boilerplate, maybe one can even use this as an entry point to cache the data on demand if it is missing. |
Knowing that it'll sound quite rude, I'll voice my concerns nevertheless. Please consider reverting the previous change for the sake of stability until a profound understanding of that piece of code was reached. |
Thanks Sebastian, that matches exactly my feelings. I've considered original PR as a quick "test" whether it would survive or not "broader" test scenarios as only Java model tests, and it did not from day one. The code itself , as I've wrote, changes the data quite often and from multiple threads, so it wonders me that it "somehow" worked before, but obviously the original authors had much more understanding about the concept as I have. So I would revert this line removal now, considering that "simple" experiment to remove it as failed - but @laeubi it doesn't mean we don't want to change / improve the code in general - we simply must be sure we are doing the right thing, which is not the case here. |
…se-jdt#3531)" This reverts commit b79bd1d as it introduces regressions. Fixes eclipse-jdt#3534
Wouldn't it help to keep the change some days to possibly find a reproducing test within jdt.core such that it can be better analyzed? |
Seeing different unrelated tests randomly failing, I assume we have multi-threading or timing issue. Also see my comment above, debugging with conditional breakpoints shows for me lot of interactions with the corresponding map. I assume if someone takes enough time to analyze how the state is supposed to be updated in the "right" way, it would be possible to provide a better change, but until then I would like to see SDK back to a stable working state we had. |
Sadly it is also true that these ideas / knowledge was not properly documented and is now los in the fog-of-time... and sad enough there seem to be no single test covering that case here in the repo. I just tried to understand from the API the inital intend here and it says:
And can't really get my head around it... how could a method know the corresponding entry "if once resolved" without resolving it?!? So for me it also seems that just removing the line won't work even though the way to fill the cache is quite suspicious, indirect and hard to understand. My expectation would be that calling the cache will fill it as needed that's why I tried to make it less exposed here but to be honest it fees I'm to old (or young?) to adapt to "JDT style" to be helpful in this regard. For me improving codebase includes adapting to modern ways that are easier to understand and maintain instead of insist of a 15 year old "consistent" way of doing things. |
https://download.eclipse.org/eclipse/downloads/drops4/I20250108-0430/testresults/html/org.eclipse.pde.ui.tests_ep435I-unit-win32-x86_64-java21_win32.win32.x86_64_21.html
However these tests run fine locally. I guess MT or timing issue.
Code does basically this:
Originally posted by @iloveeclipse in #3531 (comment)
The text was updated successfully, but these errors were encountered: