Profile packages list their dependencies in the form of packages and their versions, but the dependency graph derived from that information is not always sufficient for configuring a validation context. Better analysis could be done if the dependencies were available at the level of individual resources; this would make it possible to identify conflicts/contradictions and missing resources that cannot be uncovered by package-level analysis (but which might wreak havoc under the hood).
Is there a way to obtain a list of dependencies for some particular validation resource like e.g. a StructureDefinition pulled from a package file?
Validators have to do that internally in the normal course of their work in any case, but I cannot see a way of getting that information out. Can it be done with the HAPI or Firely libraries? If not, is there some other way of getting that information?