[ https://issues.apache.org/jira/browse/LUCENE-9623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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