This repository has been archived by the owner. It is now read-only.

Incorrect "Cyclic dependency" exception #1

Closed
andrewschaaf opened this Issue Nov 2, 2011 · 2 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment
Hide comment
@TrevorBurnham

TrevorBurnham Nov 2, 2011

Owner

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.

Owner

TrevorBurnham commented Nov 2, 2011

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

This comment has been minimized.

Show comment
Hide comment
@andrewschaaf

andrewschaaf Nov 2, 2011

quickmeme(
  GOOD_GUY_GREG,
  "fixes counter-example promptly for free",
  "takes meme well")
quickmeme(
  GOOD_GUY_GREG,
  "fixes counter-example promptly for free",
  "takes meme well")
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.