This package tracks the dependency tree of a given repository.
Run the following command:
`stack exec -- audit-exe --audit audit`
This does the following
- Creates
currentDepTree.dot
¤tDepTreeVersions.txt
. The filecurrentDepTree.dot
captures the current state of the dependency tree for the repository (generated by thestack dot
command);currentDepTreeVersions.txt
(generated by thestack ls dependencies
command) contains versions of all the dependencies in the repository. - Creates an sqlite db with three tables: auditor, hash and diff.
- Populates the auditor table with the dependencies and versions from
currentDepTree.dot
¤tDepTreeVersions.txt
respectively. - Creates a hash using
currentDepTree.dot
¤tDepTreeVersions.txt
and inserts it into the hash table.
NB: The diff table is empty because this table only holds changes to the dependency tree.
From this point running stack exec -- audit-exe --audit audit
will generate
repoinfo/updatedDepTree.dot
, repoinfo/updatedDepTreeVersions.txt
and a hash using these two files. The newly generated hash is compared to the hash in the hash table. If the hashes differ then the dependency tree has changed (a dependency has been added/removed or a dependency version has changed).
After the initial stack exec -- audit-exe --audit audit
command, running the command again will "audit" your current dependency tree and print any changes to the terminal.
NB: These changes will only be made permanent when you run stack exec -- audit-exe --audit load
. Running this command inserts the dependency tree changes from the diff table into the auditor table and then deletes all the enteries in the diff table.
The auditor table can be thought of as the permanent/historical dependency tree. The diff table can be though of as a temporary updated dependency tree which can only be made permanent by running the load
command. The hash
table stores a hash of the permanent/historial dependency tree and is a convenient way of checking if there have been any changes.