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

Will the Nashorn deprecation affect handlebars.java? #696

Open
jkissel opened this issue Apr 2, 2019 · 4 comments
Open

Will the Nashorn deprecation affect handlebars.java? #696

jkissel opened this issue Apr 2, 2019 · 4 comments

Comments

@jkissel
Copy link

jkissel commented Apr 2, 2019

Hi,
with Java 11, the Nashorn script engine was deprecated and marked for removal (see JEP 335).

  • Do you think, this will affect handlebars.java? Are there changes planned related to this issue?
  • Do you have a recommendation for users of handlerbars.java like "Use Rhino instead of Nashorn."?

Thanks for this great library. I hope we can continue using them in the future.

@TJReinert
Copy link

Not the creator, however the JDK11 community has stated that Java 11 will NOT remove Nashorn. it has only been stated that it will be deprecated. There is no need to worry at this time.

See this tweet by Mark Reinhold, Chief Architect, Java Platform Group.
https://twitter.com/mreinhold/status/1006550983072104448

@jkissel
Copy link
Author

jkissel commented May 15, 2019

Yes, I know. But Java 11 is supported only til 2022. So we're probably gonna use something like Pebble Templates, which does not have that dependency, and hope to be future-proof with that.

@TJReinert
Copy link

Understood. I know many were worried about the nashorn deal until they saw that tweet.

We may need to fork and undertake that ourselves. I have not seen much activity from the creator or many pull requests being merged.

@agentgt
Copy link
Contributor

agentgt commented Jun 5, 2019

@jkissel I think you are confusing some things.

Handlebars.java is pure Java. It only dispatches to the Javascript Engine if and only if you want to use Javascript helpers.

Thus the core library doesn't have a strong dependency on nashorn. I even bet the current version of handlebars.java works fine in JDK 11 albeit I haven't tested.

The bigger issue might be modules and reflection which eliminates proper java 9 profiles and graal vm native-image respectively. Pebble Templates probably has similar issues so ... if I was you I wouldn't drop Handlebars.java just because of the Nashorn.

If you really want to future proof I would look into Rocker which compiles templates into templates into Java.

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

3 participants