Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Incorrect "Cyclic dependency" exception #1

Closed
andrewschaaf opened this Issue · 2 comments

2 participants

@andrewschaaf
# MAIN ---> 1 ---> 2
#   \--------------\---->3
DepGraph = require 'dep-graph'
derp = new DepGraph
derp.add "MAIN", "1"
derp.add "MAIN", "3"
derp.add "1", "2"
derp.add "2", "3"
console.log derp.getChain "MAIN"
Error: Cyclic dependency from 2 to 3
    at DepGraph.getChain (/node_modules/dep-graph/lib/dep-graph.js:39:17)
    at DepGraph.getChain (/node_modules/dep-graph/lib/dep-graph.js:46:14)
    at DepGraph.getChain (/node_modules/dep-graph/lib/dep-graph.js:46:14)
    at Object. (.:9:20)
    at Object. (.:10:4)
    at Module._compile (module.js:402:26)
    at Object.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script.js:57:25)
    at /usr/local/lib/node_modules/coffee-script/lib/command.js:147:29
    at Socket. (/usr/local/lib/node_modules/coffee-script/lib/command.js:181:14)
    at Socket.emit (events.js:61:17)

@TrevorBurnham

Ha, meme well-taken!

I think I've fixed the problem, but I'd much appreciate it if you'd throw some more test cases at me.

@andrewschaaf
quickmeme(
  GOOD_GUY_GREG,
  "fixes counter-example promptly for free",
  "takes meme well")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.