-
Notifications
You must be signed in to change notification settings - Fork 189
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
Delay classpath resolution to the compile phase #460
Comments
Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
this seems to break Xtext builds
|
@cdietrich thanks for reporting the issue, it seems your use-case is currently not covered by any integration test do you think you can derive a minimal example? |
By the way I see these warnings are they expected?
|
i am not sure if you want to introduce a (circular) dependency to xtend in your tests. |
As long as everything is available in maven central I don't see a problem if we can improve the test-converage. |
Can you tell if the build order has changed between 2.5 + 2.6? Are the missing classes generated by the failing module or are they part of another module? |
the are part of the module. need to run locally. will also try to provide a more mininal example |
the problem is bootstrapping with new java/platform versions. |
👍 that would be great I'll try to take a look at it. You could try to watch out for the following things:
|
Maybe we can reproduce this with an older version of xtext as well? And if I know the root cause it might even be possible to derive an example without xtext.... |
minimal example can be found here |
it looks looks like the xtend maven plugin does not do its thing if the tycho compiler does not provide cp early |
Could you add (EPL2.0?) license information and contribute this as an integration test to tycho? You could simply add your project to https://github.com/eclipse/tycho/tree/master/tycho-its/projects and add a Testcase like this:
|
do you run tests with java 17? if yes it wont work. |
Does it work with:
|
We don't have (yet) j17 for test but we already include j8+j11 in the build, so maybe this could be enhanced to run this particular test with j17. |
no xtend 2.25 does not work with java 17. this is why i hesitate to introduce this test as it would introduce a circular dependency. |
Juts forget: can you describe what the |
i dont know the details but i assue it somehow consumes claspaths (using maven api) |
Okay then I misunderstood your comment, currently all test are run with java 11 |
yes but if you run them with 17 too then test will break |
As noted above this won't be a problem as we currently already support j8 + j11 JVM in the test, should we upgrade to J17 we most probably should support j8 + j11 + j17. |
we = tycho is not the same as we = xtend. so you would have to delete the test then again |
I have added a release note do you think it is sufficient? If not feel free to propose a change 👍 .
given we include the test as now with |
yes and no. sometimes we strugge with the maven version ranges in emf and platform and the non semantic versioning regading java versions there (newer stuff will be pulled that might need java 17) |
I have take a look at the source it boils down to (maven 3.8.4):
The interesting part is the call to getArtifacts() that states:
so it seems you should bind the Anyways can you put a breakpoint there and see in what the returned list differs? |
But we need to run before tycho compile for circular Java xtend calls |
So maybe Problem is also src path and not classpath |
I just wanted to point out that currently the plugin relies on undefined behavior :-) |
Our plugin also runs in non tycho contexts |
What I could think about is that we add the validate-classpath to the default life-cycle of phase |
looks good with new snapshot |
Currently classpath resolution is performed as part of the project setup in the
TychoResolver.resolveProject(MavenSession, MavenProject, List<ReactorProject>)
this has the disadvantage thatmvn validate
and probablymvn clean
)felix-bundle-plugin
)looking at the code of
OsgiBundleProject.resolveClassPath(MavenSession, MavenProject)
it seems not strictly necessary to run this code at this early phase...The result of this operation is set into the following keys:
CTX_ECLIPSE_PLUGIN_CLASSPATH
CTX_ECLIPSE_PLUGIN_STRICT_BOOTCLASSPATH_ACCESSRULES
CTX_ECLIPSE_PLUGIN_BOOTCLASSPATH_EXTRA_ACCESSRULES
interestingly these are only used inside OsgiBundleProject and/or Tycho compiler mojo but not accessed at the early stage, so it seems valid to init them when first accessed.
The text was updated successfully, but these errors were encountered: