ice icon indicating copy to clipboard operation
ice copied to clipboard

Java build warning

Open externl opened this issue 1 year ago • 4 comments

/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.

externl avatar Apr 18 '24 18:04 externl

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

pepone avatar Apr 18 '24 18:04 pepone

I see, so what about the warning though?

externl avatar Apr 18 '24 19:04 externl

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

pepone avatar Apr 18 '24 19:04 pepone

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

externl avatar Apr 22 '24 18:04 externl

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

InsertCreativityHere avatar Sep 24 '24 15:09 InsertCreativityHere