Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Improve dependency handling - #83

Merged
skx merged 1 commit into
masterfrom
82-dependencies
Jan 11, 2022
Merged

skx merged 1 commit into
masterfrom
82-dependencies

Conversation

@skx

@skx skx commented Jan 11, 2022 •

Copy link
Copy Markdown
Owner

Previously we handled dependencies in a naive way:

  • For each rule we were to execute
    • Get the dependencies of that rule.
    • Process the dependencies "kinda"

This worked, but it didn't express recursive dependencies:

rule1 .. which requires rule2 .. which requires rule3 ..

(Specifically we only ran the first dependency, and we didn't consider the later ones at all.)

This pull-request re-orders the handling so that we will correctly handle rules with multiple dependencies:

  • We do not detect dependency-cycles explicitly
    • However loops/cycles will be broken as we execute rules only once each time.
  • We do not attempt to handle anything with regards to inclusions.

This updates #82.

Previously we handled dependencies in a naive way:

* For each rule we were to execute
  * Get the dependencies of that rule.
  * Process the dependencies "kinda"

This worked, but it didn't express recursive dependencies:

rule1 .. which requires rule2 .. which requires rule3 ..

(Specifically we only ran the first dependency, and we didn't
consider the later ones at all.)

This pull-request re-orders the handling so that we will _correctly_
handle rules with multiple dependencies:

* We do **not** detect dependency-cycles explicitly
  * However loops/cycles will be broken as we execute rules only once
    each time.
* We do not attempt to handle anything with regards to inclusions.

This updates #82.
@skx
skx merged commit ca717b2 into master Jan 11, 2022
@skx
skx deleted the 82-dependencies branch January 11, 2022 09:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址