(Graphviz) Nodes don't show cache-specific information
WriteDotFile uses n->serialize(false, "") in order to get a Node's metadata. This excludes metadata elements which are only included when caching is enabled (e.g. cached file's name).
I currently can't think of a good way to fix this without introducing more complexity. Options I can currently think of:
- Honor
Graph::cacheEnabled: Dot file will include info, but files in the cache will be rewritten. - Separate
serialize_intoserialize_meta_andserialize_data_:WriteDotFilethen just callsn->meta(cacheEnabled())or something. More control over what gets written when, but also more code for a Node implementer to maintain. It also makes it difficult/impossible to conditionally write metadata based on the success ofserialize_data_. Might be doable alongside #10 (closed). - Rework
Graphso that its most recentMetadatais always available:WriteDotFilecan then use this to get the set of serializable properties. I think this might have the fewest issues of the current ideas, but hits the issue thatSerializehonorscacheEnabled(). What shouldGraph::metadata()produce if update hasn't been called caching is enabled? We don't really want to serialize to disk in that circumstance.
Edited by Seth Parker