Is there a best practice around setting package dependencies for non-adapter packages? For example, should we be setting a dependency between a project package and a utility package, such as PSUtilities? I couldn’t fine much information outside the Developer User’s guide, which has the following info:
If a package needs the services in another package to load before it can load, you must setup package dependencies. For example, you should identify package dependencies if astartup service for a package invokes a service in another package. The startup servicecannot execute if the package containing the invoked service has not yet loaded.
You should also identify package dependencies if Java services in a package need to access Java classes contained in another package.
I received the following response from a wM PS resource, but I wanted to open up the discussion to a broader audience, since we don’t currently set dependencies, except between a connections package and it’s consumer package.
It is a generally recommended practice to set package dependencies whenever a service or object is referred from external packages. This way there is an explicit relation is set, which makes runtime and deployment time dependencies very visible. (The deployer does a good job at it though !) It becomes very apparent in case of Adapter connections, but it helps even when external services or objects are referred from within a service. There are no downside to adding dependencies.