javadelight / delight-rhino-sandbox

A sandbox to execute JavaScript code with Rhino in Java.
Other
38 stars 12 forks source link

Is org.eclipse.xtend required or optional? #21

Closed gschnepp closed 3 years ago

gschnepp commented 3 years ago

xtend.lib requires xtext.xbase.lib which in turn requires Guava. Since all Guava's dependencies changed from optional to required from Guava 22.0 on (Guava 21.0 dependencies in delight-rhino-sandbox 0.0.13 are all optional and ok for me), this also imports com.google.code.findbugs:jsr305:3.0.2 which - tadaa! - can't be used in Eclipse RCP or Eclipse plug-in environments due to collision with an existing "standard" javax.annotation library in the eclipse plugins folder. JSR305 library contains the same java.annotation package which is not easy to work around since Java 9. (More details here: https://nipafx.dev/jsr-305-java-9/)

Could you make XTend optional if it is required for only specific cases, for example? If not: Could I exclude XTend from delight-rhino-sandbox dependencies on my own or wouldn't it work anymore?

mxro commented 3 years ago

Thank you for raising the issue! Oh that is no good! Xtext dependencies were only used in a few places and I removed them in the commit above. Changes released in version 0.0.15 that should be available on Maven central soon.

Can you confirm the fix works for you? Thank you!

gschnepp commented 3 years ago

@mxro Looks good, thank you! Eliminating every incarnation of dependency hell is by definition a good job. 👍