Open maxhbr opened 1 year ago
Here I want to try to find a complete and correct algorithm to identify the direct dependencies of some package element.
Assumptions:
$package
(one initially should freeze some timestamp, that is used to identify validity, to avoid inconsistencies)
/Software/Package
If there is a validity date attached to relations, this needs to be respected and relations need to be filtered accordingly.
other
amends
$otherElement
Bundle
describes
dependsOn
completeness == complete
to
$packege
contains
The result is the merged list of all above found artifacts.
To collect transitive dependencies, one should recursively call the above algorithm, with some kind of cycle detection
dependencyManifest
requirementFor
@iamwillbar - does the flow as Max articulates, align with your understanding?
This should probably be re-worked for the latest relationship definitions.
I don't think this will impact the 3.0 spec - moving to 3.1
Here I want to try to find a complete and correct algorithm to identify the direct dependencies of some package element.
Assumptions:
$package
), as a starting point.The Algorihm:
(one initially should freeze some timestamp, that is used to identify validity, to avoid inconsistencies)
Step 1: early exit
Step 1.a: Look, that the type is matching
$package
element is not a/Software/Package
, this algorithm shall failStep 1.b: Look at relations
If there is a validity date attached to relations, this needs to be respected and relations need to be filtered accordingly.
other
, this algorithm shall fail, as a human needs to read the commentamends
relation going out of$package
to$otherElement
, one should instead resolve its dependencies$otherElement
Bundle
, that is linked with adescribes
relation to$package
, that bundle probably describes the dependencies.dependsOn
or other relevant relation, this might be conflicting informationStep 2: identify relevant relationships
If there is a validity date attached to relations, this needs to be respected and relations need to be filtered accordingly.
Step 2.a:
$package
, of the typedependsOn
amends
relationship between this and something else, follow thatamends
relations might have caused duplicatesStep 2.b:
completeness == complete
, this shall fail as it is inconsistent informationStep 2.c:
to
sideStep 3:
$packege
viacontains
relationship, also resolve its dependencies and merge it into the above listOutput:
The result is the merged list of all above found artifacts.
Transitive dependencies:
To collect transitive dependencies, one should recursively call the above algorithm, with some kind of cycle detection
Questions:
dependencyManifest
relation?requirementFor
?