[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2021-12-10 Thread Dawid Weiss (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17457219#comment-17457219
 ] 

Dawid Weiss commented on LUCENE-9623:
-

Can we close this one as a duplicate, [~tomoko]?

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: 9.0
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2021-04-02 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17313763#comment-17313763
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

bq. What packages are exported and what are kept private - and how do we make 
the decision or get consensus about it (upon such a large codebase)?

Still I haven't come up with good idea for that, but - we might be able to get 
some statistics/numbers by searching OSS repositories that uses Lucene public 
APIs. For example, GitHub provides APIs to allow programmatically search 
repositories that are hosted on it. Of course OSS code may be only a small 
fraction of the whole though, concrete real world use cases could give us some 
clues to decide what classes/packages should be kept public? Just a random 
thought.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: main (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-12-05 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244635#comment-17244635
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

I just wanted to make things a bit clearer. To me, there are several open 
questions to be solved/answered.
 - What packages are exported and what are kept private - and how do we make 
the decision or get consensus about it (upon such a large codebase)?
 - How do we test if the modularized jars correctly work?
 - How do we integrate module system into our gradle build?

These matters are closely interwined, I don't think we can resolve them all at 
once. We'd need to start from somewhere...

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-12-05 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244601#comment-17244601
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

{quote}it's actually better if it's a conscious decision what is exported and 
what is kept private.
{quote}
I basically agree with that. Module descriptor is essentially an API that 
should be carefully defined by developers.
 I mean, we'd need some transition period. Making decision about what packages 
are exported and what are kept private for all modules would be more than I can 
handle... and if we plan to export all existing packages at the initial stage, 
why don't we automate it?

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-12-05 Thread Dawid Weiss (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244530#comment-17244530
 ] 

Dawid Weiss commented on LUCENE-9623:
-

I don't think packages change that often and in my opinion it's actually better 
if it's a conscious decision what is exported and what is kept private.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-12-04 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244429#comment-17244429
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

{quote}exports are done manual
{quote}
Ideally, we should manually maintain that which packages are exported and which 
ones are kept private, but I'm afraid it is a heavy burden for devs. Maybe, we 
could take a hybrid approach (at least initial releases with modules) - use 
manually maintained module-info.java if there exists it for a module, otherwise 
automatically generate it by jdeps tool ?

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-12-04 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244424#comment-17244424
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

As for tests, I think it might be a good start to run luke module's tests with 
the module paths instead of classpaths. Luke depends on a number of lucene 
jars, though it does not use all sub-modules, and its tests for internal APIs - 
thin wrapper of lucene APIs - can be run without Swing UI.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Uwe Schindler (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240637#comment-17240637
 ] 

Uwe Schindler commented on LUCENE-9623:
---

When developing LUCENE-9281 i was not able to test this easily :-)

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Uwe Schindler (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240636#comment-17240636
 ] 

Uwe Schindler commented on LUCENE-9623:
---

bq. Yes, I think so. I copy-pasted the auto generated module-info for only one 
analysis module to show the "provides" descriptor, but codecs look also just 
fine to me (though I have not yet closely looked at all modules).

We have to test codecs and analyzers under real conditions: sample app with 
e.g., lucene-core, lucene-backwards-codecs and lucene-analyzers-common in 
module PATH and then check what codecs you can see and which analyzers (using 
Codecs.availableCodecs(), Tokenizer.availableTokenizers(),...). Maybe also 
spawn an app. Maybe Luke is a good example.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240633#comment-17240633
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

bq. We also need some testing of the artifacts! Our standard test environment 
can't do testing of module system. This needs some "integration" tests: A 
project using the JAR files on module path - no classpath.

I was also wondering how we should test if the modules are correctly 
generated... do we need a test fixture or framework for it ??

bq. Ah I have seen in the examples above that it looks like JDEPS creates the 
services correctly.

Yes, I think so. I copy-pasted the auto generated module-info for only one 
analysis module to show the "provides" descriptor, but codecs look also just 
fine to me (though I have not yet closely looked at all modules). 

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240619#comment-17240619
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

{quote}bq.I'm really excited to try the module system, finally, but I can't 
find the time to finish the things I still have in the backlog so I'll try to 
clean up that first!
{quote}
Yes, of course, I'm not in a hurry to resolve this at all. Until you feel ready 
to deal with modules (on our build ecosystem), I'd be happy to play around or 
try to make a patch if I can take time for it.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Uwe Schindler (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240610#comment-17240610
 ] 

Uwe Schindler commented on LUCENE-9623:
---

Ah I have seen in the examples above that it looks like  JDEPS creates the 
services correctly.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Uwe Schindler (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240609#comment-17240609
 ] 

Uwe Schindler commented on LUCENE-9623:
---

By the way, this is why this issues was a requirement to enable moudle systems: 
LUCENE-9281 (our old SPIClassIterator was not able to use the module system). 
Now this all fits nicely together.

We just need BOTH, the META-INF/services for Classpath applications, but also 
the new "provides" statements in moudle info for applications using module 
system.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Uwe Schindler (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240604#comment-17240604
 ] 

Uwe Schindler commented on LUCENE-9623:
---

We also need some testing of the artifacts! Our standard test environment can't 
do testing of module system. This needs some "integration" tests: A project 
using the JAR files on module path - no classpath. And here it must be JAR 
files, the non-packaged class files won't work as far as I remember.

When doing this, you will figure out that the SPI classes (codecs, analyzers) 
won't work on module path. Because we do not only need to open the packages in 
our modules, the contents on META-INF/servisices need to be added as "native 
services" to the module info. Every module-info file must list all class names 
that are services explicit. The META-INF/service files are not read in module 
mode:

See this blog post: 
[https://blog.frankel.ch/migrating-serviceloader-java-9-module-system/]

I am not sure if JDEPS figures this out automatically!

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-30 Thread Dawid Weiss (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240543#comment-17240543
 ] 

Dawid Weiss commented on LUCENE-9623:
-

I'm really not sure how it should work. :) I'm really excited to try the module 
system, finally, but I can't find the time to finish the things I still have in 
the backlog so I'll try to clean up that first!

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-29 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240217#comment-17240217
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

{quote}I think you could use gradle itself to generate that module-info (even 
if it's temporary) - it'd be easier to collect dependencies, etc?
{quote}
In theory I think it should be possible. First we assemble a not-modularized 
JAR, then generate module-info.java for it by jdeps tool, then compile the 
generated module-info.java, and finally update the existing JAR with the 
compiled module-info.class. (As a side note, this is not my idea but it's the 
exact migration procedure to modules I read in [a 
book|https://javamodularity.com/] a moment ago.) We could do it with custom 
gradle tasks, instead of shell scripts.
{quote}If you ask me, I'd generate explicit exports (not open modules). This 
way encapsulation is enforced from the start and there is no need to backtrack 
later.
{quote}
I'm also in favor of it.

 

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-29 Thread Dawid Weiss (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240206#comment-17240206
 ] 

Dawid Weiss commented on LUCENE-9623:
-

Hi Tomoko. I think you could use gradle itself to generate that module-info 
(even if it's temporary) - it'd be easier to collect dependencies, etc?

If you ask me, I'd generate explicit exports (not open modules). This way 
encapsulation is enforced from the start and there is no need to backtrack 
later. Other than that I really have no idea how to work with the module system 
at the build level - this is uncharted territory. Makes me think if we 
shouldn't wait until the build is split into Solr and Lucene - Lucene treated 
independently seems to be easier than combined with Solr's dependencies.

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-29 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240195#comment-17240195
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

Fortunately, jdeps seems to work almost fine for me (except for the benchmark 
module).

In regards to Gradle build, this plugin seems to be needed.
 
[https://docs.gradle.org/current/samples/sample_java_modules_multi_project.html]

Also I think we'd need to consider a way to keep the module descriptors 
up-to-date...

[~dweiss] and [~uschindler],
 would you give me some feedback?

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using gradle project path 
> for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (LUCENE-9623) Add module descriptor (module-info.java) to lucene jars

2020-11-28 Thread Tomoko Uchida (Jira)


[ 
https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17240191#comment-17240191
 ] 

Tomoko Uchida commented on LUCENE-9623:
---

I attached [^generate-all-module-info.sh] that generates module-info.jar for 
all lucene jars (except for "benchmark"; please see the comments).

> Add module descriptor (module-info.java) to lucene jars
> ---
>
> Key: LUCENE-9623
> URL: https://issues.apache.org/jira/browse/LUCENE-9623
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: general/build
>Affects Versions: master (9.0)
>Reporter: Tomoko Uchida
>Priority: Major
> Attachments: generate-all-module-info.sh
>
>
> For a starter, module descriptors can be automatically generated by jdeps 
> utility.
> There are two choices.
> 1. generate "open" modules which allows reflective accesses with 
> --generate-open-module option
> 2. generate non-open modules with --generate-module-info option
> Which is the better - not fully sure, but maybe 2 (non-open modules)?
> Also, we need to choose proper module names - just using the artifact (jar) 
> name for it is OK?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org