Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
solvent
Solvent is a dependency resolver library written in rust.
Solvent helps you to resolve dependency orderings by building up a dependency graph and then resolving the dependences of some target node in an order such that each output depends only upon the previous outputs.
It is currently quite simple, but is still useful.
Example
extern crate solvent;
use DepGraph;
The above will output: d b e c a
or e c d b a
or some other valid
dependency order.
The algorithm is not deterministic, and may give a different answer each time it is run. Beware.
The iterator dependencies_of() returns an Option<Result<String,SolventError>>
.
The for loop handles the Option part for you, but you may want to check the
result for SolventErrors. Once an error is returned, all subsequent calls to
the iterator next() will yield None.
You can also mark some elements as already satisfied, and the iterator will take that into account:
depgraph.mark_as_satisfied(["e","c"]);
Dependency cycles are detected and will return SolventError::CycleDetected.
Use Cases
These kinds of calculations are useful in the following example situations:
- System package management: packages depending on other packages
- Build systems such as 'make' or 'cargo' to handle dependencies (note: neither cargo nor rustc use solvent)
- Complex software configurations such as Linux kernel configurations
- Database schema upgrades which don't need to be strictly sequential (e.g. multiple developers working on separate git branches being able to commit database schema upgrades independently, without merge conflicts) -- the author wrote solvent for this purpose.
Other Details
While elements (nodes) are registered as slices (&str) and slices of slices (&[&str]), these borrows do not persist beyond the lifetime of the register function call, as they are internally copied into Strings and Vecs (and HashMaps).
Solvent does not yet handle boolean logic. See issue #1.