2

Feature: Scheduler / Topological sorting namespaces · Issue #29 · getsynth/synth...

 3 years ago
source link: https://github.com/getsynth/synth/issues/29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

llogiq commented 4 days ago

Required Functionality
synth as of now requires the namespaces to be in order when having dependencies (for example by foreign key relations in a database) between them. A topological sort would solve this.

Proposed Solution
The most used algorithm is Kahn's which the toposort-scc crate already implements. An implementation could either (in accordance with the Apache-2.0 license) be derived from that or depend on the crate.

Use case
With the topological sort and a function to know whether a namespace depends on another, we may even parallelize generation for multiple namespaces.This would also incidentally allow us to emit a good error message if the dependency graph between namespaces is cyclic.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK