Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Web Simple Provider should support transitive dependencies. #87

@eliasvasylenko

Description

@eliasvasylenko

A bundle which provides a web resource should be able to declare requirements to other web resources. The WebresourceServlet should then resolve all these transitive dependencies and provide them over the same .../${bsn}/${BundleVersion}/ path.

I can think of three problems when we are trying to aggregate dependencies which are potentially specified multiple times:

  • For mismatched String[] resource() values, merge the sets.
  • For mismatched int priority() values, choose the one nearest in the tree or choose arbitrarily.
  • For mismatched versions, use the one nearest in the tree or choose the higher version and just hope it works... (It's worth noting this is not an insurmountable problem in javascript, at least not with ES6, just with the merging strategy.)

Following from this, when we aggregate resources we have the opportunity to derive order from the dependency graph rather than manually specifying it as a priority integer. Manual specification is probably still necessary in tricky situations so I'm not suggesting getting rid of it, but for web resources with the same priority it could fall-back to inferred ordering and most of the time I expect that would be sufficient.

Again I'm happy to PR this if you're interested. I think it should be safe wrt leaving both API and behaviour unchanged unless people have some very strange things going on in their bundles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions