jaredbeck / graph_matching

Finds maximum matchings in undirected graphs.
MIT License
45 stars 17 forks source link

circular require warning #14

Open martindemello opened 1 year ago

martindemello commented 1 year ago

I get a circular require warning when loading weighted_graph:

graph_matching-0.2.1/lib/graph_matching/algorithm/mwm_general.rb:3: warning: loading in progress, circular require considered harmful - graph_matching-0.2.1/lib/graph_matching/graph/weighted_graph.rb

The require in mwm_general seems to be solely for the check

        assert(graph).is_a(Graph::WeightedGraph)

so perhaps it could check for a sentinel method from Weighted instead.

jaredbeck commented 1 year ago

Hi Martin, Do you get this warning when running the test suite (bundle exec rspec)? If not, do you want to try reproducing this warning with a test, as a first step towards a PR?

martindemello commented 1 year ago

no, i just tried and i don't! i get it when running tests in my own project. i'll investigate further.