You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Tim Allison <ta...@apache.org> on 2018/06/19 19:46:45 UTC

Build with Java 10, but target 8 in Tika 2.0?

All,
  What would you think of requiring Java 10 to build Tika 2.0 but still
setting 8 as the target?  This would allow us to bake modularity in now.
Given that I haven't actually tried modularizing/jigsawizing Tika yet, this
could be a complete disaster, of course. :)

         Cheers,

                  Tim

Re: Build with Java 10, but target 8 in Tika 2.0?

Posted by Bob Paulin <bo...@bobpaulin.com>.
I'd also be a bit concerned with ONLY compiling with Java 10.  There are
some changes to how resources are accessed across module boundaries that
could break some existing functionality if folks decided to RUN with >
Java 9 using the module system.  I covered some of these in my 2016
Apache Con talk[1].  I've got a few of the code changes need based on
the old 2.0 branch [2] but there may be more.  So that said it might be
good to just start with the Automatic Module Name entry in the manifest
[3].  Then proceed to add the module-info.java when we've developed some
tests that run Tika as a module.  Thoughts on this approach?


[1]
https://www.slideshare.net/rpaulin1/clipboards/tika-java-9-resource-loading

[2] https://github.com/bobpaulin/tika/tree/2.x_java9

[3] http://branchandbound.net/blog/java/2017/12/automatic-module-name/


On 6/19/2018 4:10 PM, Tim Allison wrote:
>  Doh...sorry, right.
>
> Ken,
>     Tongue in cheek answer: so that I become a little less stupid about
> modern java...see above. :)
>       Real answer: _if_ we can pull it off, given that we plan to
> modularize our parsers anyways, it would be nice to use the language
> support in java >= 9 for actual modularity. I know we have to fix some
> split packages and possibly rename some of our packages.
>     I _might_ find some time soon to focus on merging Bob’s awesome 2.0
> work into master, and I thought it would be a good time to try it.
>
> Nick,
>    This is good to know.  Thank you!
>
>     Cheers,
>       Tim
>
> On Tue, Jun 19, 2018 at 4:59 PM Nick Burch <ni...@apache.org> wrote:
>
>> On 19/06/18 20:46, Tim Allison wrote:
>>> What would you think of requiring Java 10 to build Tika 2.0 but still
>>> setting 8 as the target?  This would allow us to bake modularity in now.
>>> Given that I haven't actually tried modularizing/jigsawizing Tika yet,
>> this
>>> could be a complete disaster, of course. :)
>> I'm not sure how well it'd work given that most of our dependencies
>> aren't java module-ized?
>>
>> David North (from POI) has done quite a bit on java modules for existing
>> codebases, and hit some snags, and IIRC commons have had problems too. I
>> don't mind either way though!
>>
>> Nick
>>



Re: Build with Java 10, but target 8 in Tika 2.0?

Posted by Tim Allison <ta...@apache.org>.
 Doh...sorry, right.

Ken,
    Tongue in cheek answer: so that I become a little less stupid about
modern java...see above. :)
      Real answer: _if_ we can pull it off, given that we plan to
modularize our parsers anyways, it would be nice to use the language
support in java >= 9 for actual modularity. I know we have to fix some
split packages and possibly rename some of our packages.
    I _might_ find some time soon to focus on merging Bob’s awesome 2.0
work into master, and I thought it would be a good time to try it.

Nick,
   This is good to know.  Thank you!

    Cheers,
      Tim

On Tue, Jun 19, 2018 at 4:59 PM Nick Burch <ni...@apache.org> wrote:

> On 19/06/18 20:46, Tim Allison wrote:
> > What would you think of requiring Java 10 to build Tika 2.0 but still
> > setting 8 as the target?  This would allow us to bake modularity in now.
> > Given that I haven't actually tried modularizing/jigsawizing Tika yet,
> this
> > could be a complete disaster, of course. :)
>
> I'm not sure how well it'd work given that most of our dependencies
> aren't java module-ized?
>
> David North (from POI) has done quite a bit on java modules for existing
> codebases, and hit some snags, and IIRC commons have had problems too. I
> don't mind either way though!
>
> Nick
>

Re: Build with Java 10, but target 8 in Tika 2.0?

Posted by Nick Burch <ni...@apache.org>.
On 19/06/18 20:46, Tim Allison wrote:
> What would you think of requiring Java 10 to build Tika 2.0 but still
> setting 8 as the target?  This would allow us to bake modularity in now.
> Given that I haven't actually tried modularizing/jigsawizing Tika yet, this
> could be a complete disaster, of course. :)

I'm not sure how well it'd work given that most of our dependencies 
aren't java module-ized?

David North (from POI) has done quite a bit on java modules for existing 
codebases, and hit some snags, and IIRC commons have had problems too. I 
don't mind either way though!

Nick

Re: Build with Java 10, but target 8 in Tika 2.0?

Posted by Ken Krugler <kk...@apache.org>.
Hi Tim,

What’s the issue with needing Java 10 for the build?

And yes, I think I can install it, but I’m still on 1.8 :)

— Ken

> On Jun 19, 2018, at 12:46 PM, Tim Allison <ta...@apache.org> wrote:
> 
> All,
>  What would you think of requiring Java 10 to build Tika 2.0 but still
> setting 8 as the target?  This would allow us to bake modularity in now.
> Given that I haven't actually tried modularizing/jigsawizing Tika yet, this
> could be a complete disaster, of course. :)
> 
>         Cheers,
> 
>                  Tim

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
Custom big data solutions & training
Flink, Solr, Hadoop, Cascading & Cassandra


Re: Build with Java 10, but target 8 in Tika 2.0?

Posted by Uwe Schindler <uw...@thetaphi.de>.
Don't set "Target" to 8. Use "Release" flag! This ensures that code is compiled against Java 8 method signatures. For module info just add a separate compilation source with release 9 or 10 and jar them together.

Uwe

Am June 19, 2018 7:46:45 PM UTC schrieb Tim Allison <ta...@apache.org>:
>All,
>  What would you think of requiring Java 10 to build Tika 2.0 but still
>setting 8 as the target?  This would allow us to bake modularity in
>now.
>Given that I haven't actually tried modularizing/jigsawizing Tika yet,
>this
>could be a complete disaster, of course. :)
>
>         Cheers,
>
>                  Tim

--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de