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
Various issues when importing Axon in Eclipse #2865
Comments
Thanks for filing this with us, @nils-christian. I'm afraid I can't get this resolves or looked at right away, but will try to soon. |
Add quick-install maven profile, which skips tests #2865
So, I've spent some time on this yesterday and today, so I have some feedback on the subject.
After installing Eclipse on my laptop (I'm a Linux user btw), I opened the Axon Framework project to check whether I would get the same exception. So, perhaps it's a version thing? Honestly, I haven't used Eclipse since university, so this may be a stupid suggestion.
Axon Framework's modules have test dependencies on one another for certain utilities. Granted, I would prefer these to be collected in a dedicated module. So, the build can skip the tests, but should still build the test code.
This made sense to me actually, so I added a |
To give some additional clarity on the above. |
Hi @smcvb, First of all: Thank you for taking the time to look into this issue. So, I checked out Axon (revision 4deda0c) and installed a new Eclipse with the following version:
I removed all Axon dependencies from my local Maven repository, imported the project into Eclipse and performed a full build via build automatically. The compiler shows four errors: I do agree however, that the same issues to not appear in IntelliJ (or in a Maven build), so this seems to be an issue entirely with Eclipse's internal compiler (JDT). Taking a look at the bug list from JDT, it seems that there are indeed issues regarding generics, especially when raw/wildcard and actual generics are mixed. If I change the signature of EventBusSpanFactory.propagateContext from accepting EventMessage<T> to EventMessage<?>, the error is resolved. Very weird behaviour of JDT. I am not sure what should be done about this. It seems wrong (and not very feasible regarding the maintainability) to change the code in any way just to work around a bug of the JDT. I also tested the quick install profile by running "mvn install --activate-profiles quick-install". A lot of tests are skipped in this run, but not the one in spring-boot-3-integrationtest. Those also fail if the system does not provide a running Docker environment. I hope this helps. Best regards Nils |
Awesome feedback, @nils-christian: this is very helpful. I'll make adjustments to the profile to ensure it does not pick up the Concerning the JDT of Eclipse, that's a bummer, actually. |
Hi @smcvb, It is a little bit tricky to point to a single issue. Just searching for generics and wilcards in the bug list (https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=generics%20wildcards) or the specific error message (https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=Cannot%20infer%20type%20arguments) reveals various issues. A lot of them are also a little bit older without any activity. Best regards Nils |
Hi,
This was originally part of #2855, but I think this deserves an own issue. The described issues occur when importing the current axon-4.8.x branch, but the basic problems should be viable for the main branch as well.
If I open the current axon-4.8.x branch in Eclipse, I am already greeted by two compile errors:
Not sure why. The project itself is recognized by Eclipse as JDK8 project.
This already makes it difficult if not impossible to develop anything.
Now I would try and perform a local "mvn install" with skipped tests, so that I can build the project as fast as possible and close the problematic modules (which works fine, as long as I don't want to develop within the modules with the compile errors).
If one does not have the modules already in the local maven repository, this fails:
Now I have only one chance - to build the project with enabled tests. This, by the way, forces me already to have a docker environment and everything. So I try a "mvn install" without skipping the tests. If one of the tests fails, I am out of luck. I guess I could make sure that surefire continues after a fail, but...well...
At least when using Eclipse, the hurdle to develop for the Axon framework is rather high. I know, I have provided PRs in the past, but to be honest, due to this issues this has become rather cumbersome.
We usually have a quick-install maven profile in our builds which allow to build the project very quickly without running the tests or additional checks.
Best regards
Nils
The text was updated successfully, but these errors were encountered: