I noticed in jspecify/jspecify#866 (comment) that JSpecify does not include a ModulePackages attribute in its module-info.class. That got me to check Guava, and sure enough, we don't include one here, either. That's probably for similar reasons: Maven builds the jar itself, without using jar, which would automatically modify module-info.class to include that attribute (I think).
My understanding is that ModulePackages is merely an optimization, possibly even only at runtime, not compile time, but I'm not sure of that. Still, it would presumably be a nice optimization to unlock someday.
I noticed in jspecify/jspecify#866 (comment) that JSpecify does not include a
ModulePackagesattribute in itsmodule-info.class. That got me to check Guava, and sure enough, we don't include one here, either. That's probably for similar reasons: Maven builds the jar itself, without usingjar, which would automatically modifymodule-info.classto include that attribute (I think).My understanding is that
ModulePackagesis merely an optimization, possibly even only at runtime, not compile time, but I'm not sure of that. Still, it would presumably be a nice optimization to unlock someday.