Skip to content

Guard functions requiring external graphviz binary behind "graphviz-exec" feature flag #25

@asglover

Description

@asglover

This issue and associated PR would make egraph-serialize follow the conventions in graphviz-rust regarding relying on the external graphviz CLI tool.

Graphviz-rust guards functions which require the existence of the external graphviz CLI binary behind a feature flag "graphviz-exec". This allows users who just want to create dot files and only use the rust native graphviz-rust features to do so with confidence that they aren't relying on the existence of the CLI tool.

https://github.com/besok/graphviz-rust/blob/de7946f2cb84292580579d17f53514b145c53f8a/src/lib.rs#L115-L116

I drafted a PR which would adopts this convention for egraph-serialize.

#24

The PR:

  • Adds the feature flag graphviz-exec
  • Puts to_svg_file behind this flag
  • Adds documentation about the new flag
  • Modifies the testing so that the testing is not based on a runtime test for the existence of the CLI tool, but instead on the feature flag.
  • Modifies the testing so that tests which use serde gated features only run when serde is available.

The CI only runs with all feature available, but I didn't want to mess with CI pipeline before having a checking in with how you feel about this PR / issue generally. @saulshanabrook Do you have some feedback about this proposal?

The motivation is that we want to be able to use graphviz-rust without the CLI tool for our base functionality.
And guard anything which requires the CLI tool behind a feature flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions