You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Dawid Weiss (Jira)" <ji...@apache.org> on 2021/11/24 19:23:00 UTC

[jira] [Commented] (LUCENE-10260) Luke's about window no longer shows version number

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

Dawid Weiss commented on LUCENE-10260:
--------------------------------------

I think we should get rid of the LucenePackage.get returning Package because Package.getImplementationVersion is explicitly not supported for modules. Instead, LucenePackage should return itself and have some metadata-access methods like getVersion(). I checked and this works for modules, including automatic modules - module.getDescriptor().rawVersion():

{code}
+    var module = LucenePackage.class.getModule();
+    if (module.isNamed()) {
+      System.out.println("Named: " + module.isNamed());
+      System.out.println("Name: " + module.getName());
+      System.out.println("Version: " + module.getDescriptor().rawVersion().orElse("unknown"));
+
+      try {
+        System.out.println("Manifest: " + module.getResourceAsStream("/META-INF/MANIFEST.MF"));
+      } catch (IOException e) {
+        e.printStackTrace();
+      }
+    }
{code}

The manifest can also be read and parsed, if you wanted to keep this information single-source.

> Luke's about window no longer shows version number
> --------------------------------------------------
>
>                 Key: LUCENE-10260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10260
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: luke
>    Affects Versions: 9.0
>            Reporter: Uwe Schindler
>            Priority: Major
>
> This seems to be caused by the module change. It looks like the modularized (automodule) no longer can get the Implementation verison using class LuceneVersion (in root package).
>  
> We should fix this in case of respin, otherwise it is cosmetical only.



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

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