Skip to content

abhaasgoyal/dep-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dep-lib

Intro

(Taken from project description)

Code that takes as input the immediate dependencies for various libraries (that is, which libraries import which other libraries), and produces as output the full set of dependencies for those libraries. For example:

Input File

A depends on B C
B depends on C E
C depends on G
D depends on A F
E depends on F
F depends on H

Output File

A depends on B C E F G H
B depends on C E F G H
C depends on G
D depends on A B C E F G H
E depends on F H
F depends on H

Usage

To build, use stack (preferably) or cabal

Using stack

  1. Building
stack build
  1. Executing
stack exec dep-lib-exe <input-file>
  1. Testing
stack test

Additional Notes

  1. Outputs each line in the same order as in the input. For eg - If B is the parent dependency in first line and A in second line, it wil print in the same order - B and then A
  2. If the same parent dependency is stated in multiple lines, it will consider the dependency list as union of child dependencies and print the same calculated overall dependencies in different lines. For eg-

Input

X depends on Y
X depends on R
Y depends on Z

Output

X depends on R Y Z
X depends on R Y Z
Y depends on Z
  1. The dependency list for each parent within a line is presented in a sorted order (since graph is represented by a dependency set). From the above example - Note that R, Y and Z are in sorted order.

About

Dependency library calculator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published