When I build with this combination of features:
typestate = {version="0.8.0", default-features=false, features = [ "export-dot", "export-plantuml" ]}
I am hitting:
Compiling typestate-proc-macro v0.8.0
error[E0412]: cannot find type `IntermediateAutomaton` in this scope
--> /home/andrew-otiv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typestate-proc-macro-0.8.0/src/igraph/export.rs:298:32
|
298 | impl<S, T> Export<Dot> for IntermediateAutomaton<S, T>
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> /home/andrew-otiv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typestate-proc-macro-0.8.0/src/lib.rs:188:29
|
188 | .export(&mut f, Dot)
| ------ ^^^ expected `PlantUml`, found `Dot`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/andrew-otiv/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typestate-proc-macro-0.8.0/src/igraph/export.rs:14:8
|
14 | fn export<W: std::io::Write>(&self, w: &mut W, _: F) -> Result;
| ^^^^^^
I ~think I'm using:
rustc 1.70.0 (90c541806 2023-05-31)
but I'm not entirely certain since I hit this whille messing with build systems that may or may not be setting up their own toolchain behind my back.
I get a clean build with Cargo with all features enabled, in the same environment, leading me to suspect that the issue is specific to this combination of feature flags.
The wider context, if you happen to be interested, is that I'm trying to get a state machine based on typestate-rs to build on buck2 with reindeer, and pruned out the mermaid related dependencies since they had issues (that are probably unrelated).
Thanks for the very neat libary! I'm evaluating it for use in a safety related system, where statically enforced correctness of our state machines would be an attractive feature.