weso / shex-s

Scala implementation of ShEx
http://www.weso.es/shex-s/
MIT License
5 stars 6 forks source link

Support for Java 8 #258

Closed thewillyhuman closed 3 years ago

thewillyhuman commented 3 years ago

Hi @labra,

We are using this library for Map Reduce processing within Apache Spark and would like to execute some tests on AWS EMR. Unfortunately, their environment uses Java 1.8 and claims that this library was compiled with Java 1.11.

Exception: java.lang.UnsupportedClassVersionError: es/weso/shex/parser/ShExDocLexer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 .

thewillyhuman commented 3 years ago

I think that in #4 the build.sbt file was modified to compile within Java 1.8 version. But 6 months ago in commit https://github.com/weso/shex-s/commit/ea59afe24b6a977cb39652248cdf17b5864c4dd9 the line https://github.com/weso/shex-s/blob/3ac75b4adfb00c472357e74f92d98e05596a1d6a/build.sbt#L379 was commented.

labra commented 3 years ago

OK, let's try to publish all these libraries in Java 1.8...in principle it should be doable.

thewillyhuman commented 3 years ago

The code depending on Java 1.11 is:

https://github.com/weso/shex-s/blob/505489fc0dee629887acfe44a5bc2b6eba66d24e/modules/wikibaserdf/src/main/scala/es/weso/utils/Deref.scala#L43-L59

thewillyhuman commented 3 years ago

Looks like this was fixed changing previous lines by the following ones:

https://github.com/weso/shex-s/blob/a084b7134ac6d74567dc2513e1277c63d358217b/modules/wikibaserdf/src/main/scala/es/weso/utils/Deref.scala#L49-L75

So this issue looks like is fixed.