You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2023/06/01 17:33:00 UTC

[jira] [Commented] (DAFFODIL-2816) Saved parser version checks against application version, not Daffodil version

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

Steve Lawrence commented on DAFFODIL-2816:
------------------------------------------

Are you creating a fat jar using something like sbt-assembly? If that's the case, probably what's happening is the META-INF/MANIFEST.MF that Daffodil currently extracts its version from is being overwritten with the one for your custom tool.

Workarounds are to configure the plugin so it prefers the MANIFEST.MF from the daffodil-lib jar, or to not use a fat jar and just specify your jar and all dependencies using -cp.

As a long term solution, maybe we shouldn't rely on the MANIFEST.MF file and instead should have something like a source or resource generator that creates a unique file that we can get the version from.

> Saved parser version checks against application version, not Daffodil version
> -----------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2816
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2816
>             Project: Daffodil
>          Issue Type: Bug
>            Reporter: Josh Adams
>            Priority: Major
>
> I wrote a small test program to handle large number of files that calls the Daffodil Scala API.  It loads a saved-parser to handle the processing.  When the program is packaged into a jar file and run with "java -jar" Daffodil attempts to check the version in the saved parser file against the version of the program calling Daffodil, which in my case is 0.0.1 and then obviously fails the check.
> We need some way to check against the version of Daffodil that the program is linked against instead of the version of the program itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)