elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.5k stars 24.89k forks source link

Replace groovy build-tools (buildSrc) with java #34459

Open alpar-t opened 6 years ago

alpar-t commented 6 years ago

We want to have build code implemented in Java to make it easier to maintain. We can easily mix java and groovy implementations and everything is already set up to do so, so it's already easy to create new classes in Java. It would also be great to take this opportunity to add tests for the newly written Java code.

The ingredients of a great rewrite:

Here's a list of what is still in Groovy. Note that it goes from simple to complex and there are some inner dependencies :

elasticmachine commented 6 years ago

Pinging @elastic/es-core-infra

pt429sy commented 6 years ago

Hello, I would like to work on this.

alpar-t commented 6 years ago

Hi @pt429sy that's great ! Feel free to pick a class and open a PR.

baptistemesta commented 6 years ago

just for info, I am working on NoticeTask

Megamiun commented 6 years ago

Doing UpdateShasTask, probably will make a PR tonight.

EDIT: Or tomorrow.

fabiodrg commented 6 years ago

I am interested in giving a try to PluginPropertiesExtension. From my understanding it should be quite straightforward.

cdschneider commented 6 years ago

Going to give ForbiddenPatternsTask a shot, FYI

GuptaNishant commented 5 years ago

I am working on DependenciesInfoTask, will raise a PR later

akki commented 5 years ago

I tried porting vagrant.VagrantPropertiesExtension file to Java but it seems all modules inside vagrant package have to be ported in one go to make it work; Please let me know if this work on VagrantPropertiesExtension can anyhow be used/merged separately, otherwise anybody who aims to port all the other files can feel free to use this patch.

@atorok From what I understand, https://github.com/elastic/elasticsearch/pull/34769 can be added against NoticeTask in the first comment.

paras885 commented 5 years ago

Going to give MavenFilteringHack a shot, FYI

alpar-t commented 5 years ago

@akki Java code can't reference Groovy classes, but groovy can reference Java, so one has to start with leafs in the dependency tree when porting classes.

akki commented 5 years ago

Due to long inactivity on #34476 I am picking up ConcatFilesTask.

bsamartins commented 5 years ago

@atorok, are there any updates on merges / pieces that have merged?

I can take the PrecommitTasks

alpar-t commented 5 years ago

@bsamartins you will need the other PRs merge first as you won't be able to reference Groovy classes in Java code.

rhamedy commented 5 years ago

Is this in the PR description PluginBuildPlugin #39605 correct? Shouldn't the PR #39605 be added besides PluginPropertiesExtension?

dRadest commented 5 years ago

I'd like to give DependenciesInfoTask a try if nobody's working on it

cautious-programmer commented 5 years ago

Hi @atorok, I would like to contribute but I can see that tasks above are not updated. Which task can be taken next?

alpar-t commented 5 years ago

Thanks for your interest @michal-rozak . I Updated the task to mark the ones that were completed.

Megamiun commented 5 years ago

@atorok I think the correct PR about the DependencyLicensesTask and UpdateShasTask is the #41921 one. The one listed is the old one

cautious-programmer commented 5 years ago

@atorok, I want to pick PrecommitTasks, ok?

cautious-programmer commented 5 years ago

@atorok Oh, it seems that PrecommitTasks is taken/in progress. Maybe DocsTestPlugin then?

alpar-t commented 5 years ago

I don't think @bsamartins did any work on PrecommitTasks so I think you could take either one @michal-rozak

jbonn360 commented 5 years ago

Hi @atorok, I'd like to work on MavenFilteringHack if no one's working on it

rh-id commented 4 years ago

hello @alpar-t would like to work on AntTask if no one's working on it

alpar-t commented 4 years ago

@mark-vieira where do we stand on the AntTask ?

mark-vieira commented 4 years ago

My preference would be to remove it, and refactor the two remaining subclasses to not rely on Ant. So I'm not sure it's a good candidate for migration right now.

mrmodise commented 4 years ago

@mark-vieira @alpar-t I just pulled the latest code and I see PrecommitTasks is still pending migration. I would like to take it on if its not hanging in the PR state. Thanks

sachinpaliwal1981 commented 3 years ago

is there any class pending from the list where work is not in progress already, I would like to contribute.

mark-vieira commented 3 years ago

@sachinpaliwal1981 Both MavenFIlteringHack and NoticeTask are good candiates that have no dependencies on other Groovy code and are mostly a strait conversion to Java.

MarkRibeiro commented 3 years ago

I would like to work on this, where can i start?

edh-oss commented 3 years ago

I'd like to work on the code related to docs, SnippetTask and the related classes.

I have a couple questions:

I've seen both junit and spock used for tests. Is there one test framework that you want to make the standard, or does it not matter?

Is there any documentation that spells out things like "This is what constitutes a valid code snippet", or is the existing implementation effectively the documentation as well?

mark-vieira commented 3 years ago

I've seen both junit and spock used for tests. Is there one test framework that you want to make the standard, or does it not matter?

Yes, we want to prefer Spock going forward.

Is there any documentation that spells out things like "This is what constitutes a valid code snippet", or is the existing implementation effectively the documentation as well?

Yeah, I think we'll have to go off of the existing implementation.

edh-oss commented 3 years ago

I'm having trouble getting Spock tests under build-tools-internal recognized by Gradle. I added details and examples in a comment to issue #78864 , thinking it may be related.

pugnascotia commented 2 years ago

@breskeby am I correct in thinking that this is something that you've been working on?

breskeby commented 2 years ago

@pugnascotia yes there is not much groovy left these days but the stuff that is left is more than just a simple port

elasticsearchmachine commented 2 years ago

Pinging @elastic/es-delivery (Team:Delivery)

morantaf commented 1 year ago

Hey, I'm going to give a go to SnippetsTask