-
-
Notifications
You must be signed in to change notification settings - Fork 15
Switch to Maven on infrastructure #39
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
Conversation
@andreaTP Thank you again :) @exercism/java will need your thoughts on this please! It feels like a sane solution from an outsiders perspective, but I know nothing about any of this. A naive question maybe, but do we need Gradle or Maven at all? As we know the dependencies that are used (basically none) can we do without those? Or are these things integral into the ability to run Java? |
@iHiD compiling and running tests can be done using only I warmly suggest not going in this direction, it will require a lot of maintenance since every little change to dependencies will change the commands and you would need to manually build the entire classpath (transitive dependencies included).
I do have some availability to chat and share whatever is needed today and tomorrow. |
@andreaTP It looks to be working! I get between a 3-4 second speedup on my machine. From 13.6 seconds to 9-10 seconds. So as far as I'm concerned, this is definitely a good approach. I'll let someone from @exercism/java judge whether we need to convert everything to Maven. The downside of using Gradle for the exercises and Maven to run them are the different error messages? |
if the build tool setup is "fixed" and stable I would say that this is the only pitfall. Regarding the wider subject of Maven vs. Gradle I do believe that the decision depends mostly on target audience. That said if this PR fixes the original issue ( exercism/exercism#6097 ) I encourage you to go ahead and bring this to production, I do believe that is better to have slightly confusing error messages and stability other than repeated timeouts. |
I think this is a big breaking change that should be eventually introduced very gradually ( yes I am a very conservative developer :) ). To open a discussion, what do you think about the following scenario:
If this could be possible it would bring some benefits:
I'm afraid to block the track because some bugs could rise that we haven't think about. By the way in my opinion there are not problems for the representer, I don't currently know for the analyzer (I have to investigate). |
The Java track is timing out about 40% of the times, saving a few seconds should already be enough to prevent timeouts.
Those steps will be implemented simply by merging this PR and going to prod, the Not sure about the "gradually" and the "possible bugs", tomorrow I will possibly still have some time to spend on this and eventually fix forward, starting next week I'll probably be less available. |
We don't have to convert all the exercises to Maven if I understand this correctly. The test runner seems to work fine with Gradle-based exercises, even when using Maven to run the tests. The key thing is that the test runner currently times out a lot, so as this PR shaves off 3-4 seconds, it might drastically cause the number of timeouts to drop. Is there any situation where using Maven in the test runner won't work with the Gradle exercises? |
The answer is that Maven will behave the very same as Gradle on all of the tracks that are currently compiling with a Doing a search in the https://github.com/exercism/java repo I can find 132 files
are often omitted but this won't change anything unless ppl start to use strange file encodings. There are although 2
those 2 are declaring extra dependencies and I think that they are not going to work with the current runner, if they do run, the only explanation is that they match gradle internal dependencies (maybe @mirkoperillo have a more definitive answer for those cases 🙏 ). Let me know how you want to proceed! 🙂 |
That's exactly what should be done. Any dependencies used in exercises should be pre-loaded in the test runner. |
@ErikSchierboom 👍 done here: |
I think as Erik implies, the key thing is that currently the Java Test Runner (and other Java based languages) are all timing out on the website which is causing massive problems. So I feel like we need some fast solution for that. 100% that we don't want to break the track for students who already use it, but if this change only affects the test-runner, then I think this is a solid net-positive with little risk. If I've misunderstood and this does affect the track and involve lots of changes, could someone make that clear pls? @mirkoperillo Would love to get your 👍 on this today so we can try it if you're around and agree with what I've written above. |
@andreaTP Erik already answered about it.
It seems that the changes are only for this repo, so I am agree with you to try it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I've tested things a bit and it seems to work. Let's go!
Ref: #37 (comment)
The
maven
test task is taking consistently less thangradle
on clean projects.Again, please verify that I'm not missing something ( 😉 @ErikSchierboom ), but now I'm pretty confident this is the way to go, I tested on a few Java exercises and this is taking about 1/2 the time than
gradle
.There are additional considerations to be done regarding error messages since if we take this approach ppl will see a Maven output instead of the Gradle one.
Moving all the Java track exercises to Maven can be considered and will be mostly mechanical work (cc. @iHiD ).