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

Update to Groovy 3 #32

Closed
Vampire opened this issue May 25, 2020 · 9 comments
Closed

Update to Groovy 3 #32

Vampire opened this issue May 25, 2020 · 9 comments

Comments

@Vampire
Copy link

Vampire commented May 25, 2020

Would be nice to have an updated version for Groovy 3. :-)

@szpak
Copy link

szpak commented Sep 28, 2020

I've bumped the same today trying to verify that some strange compiler behavior occurs also on some other machine.

@glaforge
Copy link
Owner

glaforge commented Jul 9, 2021

It's not easy to update to Groovy 3 or provide a Groovy 3 flavor, as some dependencies needed by the project won't work with Groovy 3.
That said, I'm working on a totally new Groovy Web Console, whose prototype can be seen here:
https://gwc-experiment.ew.r.appspot.com/
It'll allow you to pick up the version of Groovy you want. At least, the latest versions of the main branches, ie Groovy 2.5, Groovy 3, and Groovy 4 when it's out.
I'll be closing this ticket, as I won't upgrade / add Groovy 3 support in this old code base.

@glaforge glaforge closed this as completed Jul 9, 2021
@Vampire
Copy link
Author

Vampire commented Jul 9, 2021

That's great, thanks. :-)
Maybe a "little" suggestion that you could consider for that project.
It would be super-nice if you could either re-use https://github.com/AlexanderPrendota/kotlin-compiler-server as backend just adapted to compile and run Groovy instead of Kotlin, or at least would provide the same API that server is providing.

The background is this: https://issues.apache.org/jira/projects/GROOVY/issues/GROOVY-9975
If the new web console provides the same API the kotlin-compiler-server is providing, then it is a very minimal effort (basically changing an if to support Groovy and using a different URL for the back-end in the https://www.npmjs.com/package/kotlin-playground component.

This would instantly enable documentation, blogs and basically any website to have interactive syntax-highlighted editable runnable Groovy examples. For example look at the first two examples on https://kotlinlang.org/docs/null-safety.html#nullable-types-and-non-null-types, there you can see that component in action. I was even able to make it work for the happy path with the current codebase in this repository by allowing CORS and adapting the call and response processing in the playground component.

@glaforge
Copy link
Owner

glaforge commented Jul 9, 2021

When working on the new console experiment, the idea of having the ability to make the Groovy documentation have runnable code snippets was indeed in my mind. We'll see if we get to implement it, but that would be nice :-)

@Vampire
Copy link
Author

Vampire commented Jul 9, 2021

That would really be awesome.
Especially as it should be relatively easy to reuse that component when you provide the same API on the compile server side. :-)

@Vampire
Copy link
Author

Vampire commented Jul 9, 2021

Is the code of the new web console already shared somewhere or is it just private play up to now?

@leonard84
Copy link

leonard84 commented Jul 9, 2021

basically changing an if to support Groovy

we would still have to fork that library and release our own version, I don't know how receptive JetBrains would be to extract the common functionality into a base component.

@leonard84
Copy link

Is the code of the new web console already shared somewhere or is it just private play up to now?

it is in a private repo at the moment

@glaforge
Copy link
Owner

glaforge commented Jul 9, 2021

Is the code of the new web console already shared somewhere or is it just private play up to now?

it is in a private repo at the moment

I've just made it public, in case others want to contribute too.

The URL for the repository is here:
https://github.com/glaforge/gwc-experiment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants