Skip to content
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

Add Groovy language basic support #32865

Closed
wants to merge 1 commit into from

Conversation

essobedo
Copy link
Contributor

@essobedo essobedo commented Apr 24, 2023

fixes #2720

Motivation

The Groovy language is widely used so it would be nice to propose its support in Quarkus out-of-the-box.

Modifications:

  • Add a groovy extension with native and dev mode support
  • Add resteasy-reactive-groovy to the native tests in HTTP category
  • Add groovy to the target language
  • Write codestart in Groovy
  • Add codestart to the metadata of the extension reactive-routes to ensure that the sources are added when creating the project
  • Update the codestart metadata to add Groovy to all extensions for which Groovy version has been proposed

Result

Even if those changes don't cover hibernate-orm and hibernate-orm-reactive, Groovy can be used to write a Quarkus application

@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/codestarts area/config area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/graphql area/health area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/maven area/picocli area/platform Issues related to definition and interaction with Quarkus Platform area/qute The template engine area/resteasy-classic area/rest area/smallrye area/spring Issues relating to the Spring integration area/testing area/websockets labels Apr 24, 2023
@essobedo
Copy link
Contributor Author

Follow-up PRs will be proposed to add ORM support and some doc

@github-actions
Copy link

github-actions bot commented Apr 24, 2023

🙈 The PR is closed and the preview is expired.

@maxandersen
Copy link
Member

super interesting!

I think it would be better having this more like an external extension similar to scala3 support like https://github.com/quarkiverse/quarkus-scala3. We are trying to avoid grow quarkus core repo size and dependency set.

@maxandersen
Copy link
Member

a quick scan shows that codestarts might be the place we have a limit on language extendability but we should be able to fix or live with that in some way for this. wdyt?

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 25, 2023

Failing Jobs - Building c32037f

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs
JVM Tests - JDK 17 Windows Build Failures Logs Raw logs
JVM Tests - JDK 19 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/groovy 

📦 integration-tests/groovy

io.quarkus.groovy.maven.it.GroovyDevModeIT.testExternalGroovyReloadableArtifacts line 93 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.groovy.maven.it.GroovyDevModeIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/groovy 

📦 integration-tests/groovy

io.quarkus.groovy.maven.it.GroovyDevModeIT.testExternalGroovyReloadableArtifacts line 93 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.groovy.maven.it.GroovyDevModeIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 17 Windows #

- Failing: integration-tests/groovy 

📦 integration-tests/groovy

io.quarkus.groovy.maven.it.GroovyDevModeIT.testExternalGroovyReloadableArtifacts line 93 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.groovy.maven.it.GroovyDevModeIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 19 #

- Failing: integration-tests/groovy 

📦 integration-tests/groovy

io.quarkus.groovy.maven.it.GroovyDevModeIT.testExternalGroovyReloadableArtifacts line 93 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with io.quarkus.groovy.maven.it.GroovyDevModeIT was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@essobedo
Copy link
Contributor Author

essobedo commented Apr 25, 2023

I think it would be better having this more like an external extension similar to scala3 support like https://github.com/quarkiverse/quarkus-scala3. We are trying to avoid grow quarkus core repo size and dependency set.

If so, it is unclear to me why to propose Kotlin and Scala in Quarkus core knowing that they are more or less as popular as Groovy. Do you consider Groovy as less important?

Please also note that there is a very limited number of JVM-based languages so it is not like any other extensions that are potentially unlimited.

a quick scan shows that codestarts might be the place we have a limit on language extendability but we should be able to fix or live with that in some way for this. wdyt?

Code starts are really interesting to get started with Groovy and Quarkus as it provides something already working even in native mode which could prevent end-users from making common mistakes like for example not making JUnit test case methods returning void.

@gsmet
Copy link
Member

gsmet commented Apr 25, 2023

As for Scala, it was incorporated before we decided to not include everything in core (the decision was mostly driven by the size of the build but also to offer the ability to have different release cycles). This is Scala 2 though, Scala 3 is hosted in the Quarkiverse. It was my intention to move Scala 2 out of the tree but it has not been moved outside the tree because of the codestarts limitations.

To be honest, I’m a bit reluctant to incorporate languages in the tree for which we have no experts in the current core maintainers.

I agree we should work on alleviating the codestarts limitation as we need to be able to develop language support outside of the core tree.

/cc @ia3andy

@essobedo
Copy link
Contributor Author

I see bad news for Groovy developers then

@essobedo essobedo closed this Apr 25, 2023
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Apr 25, 2023
@essobedo essobedo deleted the 2720/groovy-basic-support branch April 25, 2023 08:51
@gsmet
Copy link
Member

gsmet commented Apr 25, 2023

I don’t understand why it would be bad news?
If you’re interested in maintaining it, let’s create a Quarkiverse extension as we definitely don’t want your good work to go to waste.

And we can create an issue for the codestarts support and prioritize it accordingly. That would allow us to also move the Scala one to the Quarkiverse.

@ia3andy
Copy link
Contributor

ia3andy commented Apr 25, 2023

I need to give it a try but now that we have Quarkiverse codestart support, this shouldn't be a limitation anymore!

@maxandersen
Copy link
Member

@essobedo sorry, if any misunderstanding here. I/we are interested in enabling Groovy but we don't want to repeat the mistake of including i.e. Scala directly in core as it actually degraded very quickly - that's why when someone showed up with Scala 3 support we placed it in Quarkiverse.

If we could magically do same for Kotlin I would do that too; but for now we have it in core as it works.

Groovy I would love to see support for and the best way of doing that is by enabling those who are experts and interested in it to release and iterate independently from the core repository.

Being in Quarkiverse is NOT a discouragement; its about enabling faster movement.

@gsmet
Copy link
Member

gsmet commented Apr 25, 2023

IIRC it wasn’t possible to define additional languages.

But I might have missed something or it might have been fixed already.

@maxandersen
Copy link
Member

f so, it is unclear to me why to propose Kotlin and Scala in Quarkus core knowing that they are more or less as popular as Groovy. Do you consider Groovy as less important?

just to answer this specifically - these two are in there as that was contributed in very early days of Quarkus. Now 3+ years later we've grown and learned and trying to setup core to be language agnostic rather than tie core to specific versions of the languages/libraries.

At the moment we don't have contributors doing any Groovy. If we do it in core it will take much longer; hence the suggestion to move majority of this into quarkiverse extension as it lets those doing Groovy contribute and grow this much faster.

@aaloise
Copy link

aaloise commented Apr 25, 2023

Groovy on Quarkus is very interesting. I hope this union works. I myself opened issue #2720 back in 2019 with the expectation of seeing this integration.

I ask @essobedo not to be discouraged. The considerations made so far are just minor adjustments to be made. Your contribution was very valuable.

I'd rather see Groovy on Quarkus as an extension than not have it at all.

@essobedo
Copy link
Contributor Author

Ok, I can move it to Quarkiverse, let me know when the repository will be ready. I will then rewrite the PR accordingly as soon as possible. And I will do my best in terms of commitments behind a Quarkiverse extension.

@maxandersen
Copy link
Member

sounds great @essobedo - if any challenges do reach out on quarkus-dev or zulip chat if hitting some roadblocks.

gastaldi added a commit to quarkiverse/quarkiverse-devops that referenced this pull request Apr 25, 2023
@gastaldi
Copy link
Contributor

The https://github.com/quarkiverse/quarkus-groovy repository is now created. You should have received an invitation email to join the Quarkiverse organization, @essobedo.

Here are the next steps (eg. how to list your extension in code.quarkus.io, docs, etc): https://github.com/quarkiverse/quarkiverse/wiki/Checklist#after-the-repository-is-created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/codestarts area/config area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/graphql area/health area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/maven area/picocli area/platform Issues related to definition and interaction with Quarkus Platform area/qute The template engine area/rest area/resteasy-classic area/smallrye area/spring Issues relating to the Spring integration area/testing area/websockets triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Groovy language support
6 participants