Skip to content

Petgraph dependency version #1350

@chingiztob

Description

@chingiztob

Description

The rustworkx depends on petgraph version 0.6.5, but the release of petgraph 0.7.0 causes a version mismatch in the dependency graph. This leads to compilation errors like:

error[E0277]: the trait bound `petgraph::Graph<graph::GraphNode, graph::GraphEdge>: rustworkx_core::petgraph::visit::GraphBase` is not satisfied
   --> cascade-core/src/streets.rs:60:29
    |
60  |     let largest_component = connected_components(&graph)
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rustworkx_core::petgraph::visit::GraphBase` is not implemented for `petgraph::Graph<graph::GraphNode, graph::GraphEdge>`, which is required by `&petgraph::Graph<graph::GraphNode, graph::GraphEdge>: rustworkx_core::petgraph::visit::GraphBase`
    |
help: there are multiple different versions of crate `petgraph` in the dependency graph
   --> cascade-core/src/algo/dijkstra.rs:12:5
    |
12  | use petgraph::graph::NodeIndex;
    |     ^^^^^^^^ one version of crate `petgraph` is used here, as a direct dependency of the current crate
    |
   ::: cascade-core/src/streets.rs:6:5
    |
6   | use rustworkx_core::connectivity::connected_components;
    |     ^^^^^^^^^^^^^^ one version of crate `petgraph` is used here, as a dependency of crate `rustworkx_core`
note: two types coming from two different versions of the same crate are different types even if they look the same

What is the expected enhancement?

Bump petgraph to 0.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions