sdedic opened a new pull request, #7063: URL: https://github.com/apache/netbeans/pull/7063
In Oracle Luna Labs environment, where Apache NBLS runs alongside Microsoft Java support, we've encountered an interesting situation: - the client starts from a pristine VM. No Gradle or Maven artifact caches - when LSP client asks NBLS to open a project, NBLS checks if a priming build should run - Maven enables priming build if and only if project loading fails, or a (1) direct dependency is missing - at the time, NBLS Maven attempts to load the root project, the direct dependencies are already fetched by Microsoft Java initializing Maven in parallel to NBLS - NBLS *is now able* to load the project; however certain dependencies from the deep of the dependency tree are still being loaded to the computer. (2) But the priming build on the root project is now disabled - no need to prime. - NBLS skips prime, searches for subprojects and opens them (3) without priming - Subprojects contain *direct dependencies* on artifacts that the root project did not reference (althoug they may have been in the closure) - As subprojects open, they are analyzed. POM load fails and (4) a notification dialog will pop up (missing dependencies, missing properties) So this fix contains two changes. Changes project analysis (1) in that not only direct dependencies, but indirect ones, too, will cause the project to be marked as "broken", suggesting to run a priming build (to download dependencies). This might be useful, since in NB21, when the user adds a dependency to `pom.xml`, it is not really visible in completion unless the dependency *happens* to be in the local repository - until the next build. This fixes (2). And the second fix modifies (3) in that each newly discovered subproject is checked for priming action and potentially primed. The subproject check is then done again ... and again until the closure is searched fully. Note that the parent primes first (if possible), so chances are all children will be primed during this process. And children are always processed only after the parent primes. The 2nd+ child level processing will happen if the local repository is partially populated in a way that satisfies the parent (parent load does not notice any issues), but NOT the subprojects. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
