-
Notifications
You must be signed in to change notification settings - Fork 194
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
Eager resolution isn't evaluated correctly #2341
Comments
This is the log I get when I try to import projects.
|
If the packaging type is
If you are using mixed builds, this and eager resolve are mutual exclusive in most cases, because Tycho can't know the result of the build before hands. That is what lazy resolve do, delaying the final resolve until the non-tycho projects are build. |
@laeubi thanks! The thing is, I'm not really building anything while importing, I'm just creating a dependency graph between projects. There is a check at some point that says "if it is lazy resolve, then include POM IUs". I don't understand why it would be done only in lazy mode. Anyway, I'll play with the code to try to solve this, but most probably it's going to require a flag stating "I'm an IDE importing, slightly change the behavior" |
If you don't build anything then you don't need eager resolve. The dependency-graph is computed by the GraphBuilder independently.
In eager mode pom dependencies are already considered at the early stage (that's why this don't work with dependencies that are only created at build time).
This will most probably not be possible. Tycho is a maven plugin and not an IDE plugin. If you need to solve things special for your IDE you need to implement it as a plugin for your IDE... |
Not true. Importing works by calling lifecycle participants, which in turn should resolve the dependencies graph. Anyway, I've prepared a demo PR which solves this issue, will publish soon. |
Well if you know it better why are you asking?
As said I don't think it will be something relevant for Tycho or we want to integrate. Lazy resolve is the new way Tycho works and we won't add any hacks back to support eager resolve any further as it is. |
@lppedd I'll close this for now as Tycho4 now allows to configure this in the target platform: |
Debugging the IntelliJ IDEA integration, and after setting the system property
tycho.target.eager
totrue
, I was expecting all projects to be resolved in the eager mode.Turns out it's not always the case:
Why is that? Well, for some projects the
MavenProject#getPlugin(...)
returnsnull
(maybe because the packaging type isjar
), sosetRequireEagerResolve
is never called.This completely break tooling that expect all projects to be resolved at the same time.
Btw, this wasn't the case a month back, I think the lifecycle participant has been changed a lot in the meantime.
Maybe this has something to do with mixed builds? If that is the case, I'd like to understand why lazy resolve is required.
cc @bric3
The text was updated successfully, but these errors were encountered: