zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.04k stars 592 forks source link

Java build warning #2058

Closed externl closed 1 week ago

externl commented 5 months ago
/Users/joe/Developer/zeroc-ice/ice/java/src/Ice/src/main/java/module-info.java:12: warning: [module] module not found: com.zeroc.icebox
      com.zeroc.icebox;

The file has the contents:

module com.zeroc.ice {
  exports com.zeroc.Ice;
  exports com.zeroc.IceSSL;
  exports com.zeroc.Ice.Instrumentation;
  exports com.zeroc.Ice.IceMX;
  exports com.zeroc.IceInternal;
  exports com.zeroc.IceUtilInternal to
      com.zeroc.icebox;
}

Not obvious to me why it's structured like this. I don't think there's any icebox code in the ice module.

pepone commented 5 months ago

this is a qualified export, IceBox depends on code from com.zeroc.IceUtilInternal. This exports allow to only expose this package to the given module.

exports and exports…to. An exports module directive specifies one of the module’s packages whose public types (and their nested public and protected types) should be accessible to code in all other modules. An exports…to directive enables you to specify in a comma-separated list precisely which module’s or modules’ code can access the exported package—this is known as a qualified export.

https://www.oracle.com/corporate/features/understanding-java-9-modules.html

externl commented 5 months ago

I see, so what about the warning though?

pepone commented 5 months ago

My guess is that it is related to the Gradle setup, but I haven't looked too deeply into it.

externl commented 5 months ago

Sounds like this issue https://stackoverflow.com/questions/53670052/how-to-define-qualified-exports-to-unknown-modules

InsertCreativityHere commented 1 week ago

This was 'accidentally' fixed by #2770, which removed the IceUtilInternal package, fixing this warning.