You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2022/12/14 22:55:00 UTC

[jira] [Commented] (DAFFODIL-2683) Don't split packages across jars - OGSI packaging requirements

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

Mike Beckerle commented on DAFFODIL-2683:
-----------------------------------------

I looked into rebasing my draft work onto the latest main, and the result is a mess.

The right strategy here is for daffodil-{_}*module*{_} to have all its packages moved from 

org.apache.daffodil.pkg

to 

org.apache.daffodil.{*}_module_{*}.pkg

So that no symbol stays in the same package it is currently in. The exception to this should be daffodil-japi and daffodil-sapi. Those should not change on the usable surface. Those do not span module boundaries anyway. 

This whole conversion needs to be scripted so that it can be run, everything updated, and then committed without much development going on in between. It's a good time to forwarn the whole dev list and get people to synchronize around this change.

Other kinds of renaming/refactoring will interact very badly with this. 

The scripts need to scrape each module (that we are changing, which is any module that contains a package that is extended in other modules) for the names of all objects and classes defined in that module. 

Then we need to generate a rename script that finds any import statement for those symbols and changes them to the new locations.

Then we need to generate a re-package script that changes the package statement in each file of the module.

Then we need to script moving the files (introducing the new tier of directory) for the new tier in the package name.

> Don't split packages across jars - OGSI packaging requirements
> --------------------------------------------------------------
>
>                 Key: DAFFODIL-2683
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2683
>             Project: Daffodil
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 3.3.0
>            Reporter: Mike Beckerle
>            Assignee: Mike Beckerle
>            Priority: Major
>
> A user wants to use daffodil inside Apache Karaf, which uses OGSi containers.
> Converting a jar to an OGSi container is feasible; however, there is an underlying assumption that a package is not split across such containers. 
> As of daffodil 3.3.0, the package structure is not organized this way. The packages are orthogonal to the modules. 
> For example org.apache.daffodil.processors is split across 6 modules:
>  * daffodil-io
>  * daffodil-lib
>  * daffodil-macro-lib (which shouldn't create a jar, but still it mentions the package)
>  * daffodil-runtime1
>  * daffodil-runtime1-unparser
>  * daffodil-tdml-lib (only in test code, which shouldn't impact the jar)
> The requirement is for each package to end up in exactly and only one Jar.
> This ticket possibly interacts with other refactoring tickets that are open such as DAFFODIL-2536. 



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