This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It is desirable for a module providing an API to be able to declare which packages it exports (incl. from its extensions). For example: OpenIDE-Module-Public-Packages: org.nb.api.foo.*, org.nb.spi.foo.** (Here: the package org.nb.api.foo is exported; org.nb.spi.foo and any subpackages are exported.) Modules depending on it via specification version may only directly access classes (and I suppose resources) in these packages, enforced by classloader. For compatibility, by default all packages would be public. The syntax: OpenIDE-Module-Public-Packages: - would mean that *none* are. (The module might still be used as an API in other ways, e.g. via XML.) nbres: and nbresloc: URLs and systemClassLoader would still load resources and classes from module classloaders regardless of this declaration. Only module classloaders would be restricted. Only module dependencies with no version indicated, or with a specification version dependency, would be affected. Module dependencies based on exact implementation version match would *not* be restricted by the declaration, meaning that bridge modules could have access to classes not officially part of an API, so long as they were closely tied to the base module and shared impl versions.
I was affraid what you will do with bridge modules, but your decision (specification/implementation version) seems right, Jesse.
I hope that will make things work correctly for bridge modules. Note that this would mean bridges would have to be made so that the impl versions match that of the main module. Minor build script adjustment, to ensure that both subst manifests are updated at once, even if you e.g. change just one source manifest and do an incremental build.
Issue #19622 contains much of the basic implementation.
committed * Up-To-Date 1.2 core/manifest.mf committed * Up-To-Date 1.6 core/javahelp/manifest.mf committed * Up-To-Date 1.25 core/src/org/netbeans/core/modules/Module.java committed * Up-To-Date 1.34 core/src/org/netbeans/core/modules/NbInstaller.java committed * Up-To-Date 1.18 core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java committed * Up-To-Date 1.4 core/test/unit/src/org/netbeans/core/modules/SetupHid.java committed * Up-To-Date 1.11 core/test/unit/src/org/netbeans/core/modules/build.xml added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-all.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-api.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/api-mod-export-none.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/uses-api-impl-dep.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/uses-api-simple-dep.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/uses-api-spec-dep.mf added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/exposes-api/org/netbeans/api/foo/PublicClass.java added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/exposes-api/org/netbeans/modules/foo/ImplClass.java added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/uses-api/usesapi/UsesImplClass.java added * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/jars/uses-api/usesapi/UsesPublicClass.java committed * Up-To-Date 1.86 core/www/plans/plan.xml committed * Up-To-Date 1.58 openide/openide-spec-vers.properties committed * Up-To-Date 1.67 openide/api/doc/changes/apichanges.xml committed * Up-To-Date 1.22 openide/api/doc/org/openide/doc-files/upgrade.html committed * Up-To-Date 1.76 openide/api/doc/org/openide/modules/doc-files/api.html committed * Up-To-Date 1.14 openide/www/versioning-policy.html
Moved basic impl of this part into central module system, leaving #19622 impl (classpath packages) in NbInstaller. committed * Up-To-Date 1.5 core/src/org/netbeans/core/modules/ModuleInstaller.java committed * Up-To-Date 1.41 core/src/org/netbeans/core/modules/ModuleManager.java committed * Up-To-Date 1.45 core/src/org/netbeans/core/modules/NbInstaller.java committed * Up-To-Date 1.21 core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java removed * Up-To-Date 1.1 core/test/unit/src/org/netbeans/core/modules/NbInstallerTest1.java