tjwatson commented on issue #74:
URL: https://github.com/apache/felix-atomos/issues/74#issuecomment-1766467840

   I don't recall the details of why I didn't add all packages for automatic 
modules.  But I do know the javadoc for ModuleDescriptor.exports states:
   
   > If this module is an automatic module then the set of exports is empty.
   
   
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/module/ModuleDescriptor.html#exports()
   
   And that is what is used to generate the OSGi bundle manifest header for 
exported packages (if the module does not container an OSGi bundle manifest 
already):
   
   
https://github.com/apache/felix-atomos/blob/master/atomos/src/main/java/org/apache/felix/atomos/impl/modules/AtomosModules.java#L530
   
   Would you like to try creating a PR that changes that to check for automatic 
modules?  Something like:
   
   ```java
                   if (desc.isAutomatic()) {
                        desc.packages().stream().sorted().forEach(p -> {
                                // add p to exportedPackageHeader
                        });
                   }
                   else
                   {
                       // do the normal thing
                   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to