-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1092 #1140
Fix #1092 #1140
Conversation
Looks good, /cc @aearly |
Also as we've started using some external dependencies in v2, do you think it makes sense to use an existing graph (with dag support) implementation in auto? |
@@ -2,7 +2,7 @@ | |||
|
|||
import arrayEach from 'lodash/_arrayEach'; | |||
import forOwn from 'lodash/forOwn'; | |||
import indexOf from 'lodash/_baseIndexOf'; | |||
import indexOf from 'lodash/indexOf'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aearly I wrote my checkForDeadlocks
assuming I had the lodash/JavaScript standard semantics. Got test failures because I hadn't included start index.
Thought I was better off importing the public API method, in case someone else were to come and repeat my mistake at another time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We weren't importing indexof to avoid including the lodash internal
toInteger implementation
On May 4, 2016 3:53 PM, "Paul Anderson" notifications@github.com wrote:
In lib/auto.js
#1140 (comment):@@ -2,7 +2,7 @@
import arrayEach from 'lodash/_arrayEach';
import forOwn from 'lodash/forOwn';
-import indexOf from 'lodash/_baseIndexOf';
+import indexOf from 'lodash/indexOf';@aearly https://github.com/aearly I wrote my checkForDeadlocks assuming
I had the lodash/JavaScript standard semantics. Got test failures because I
hadn't included start index.Thought I was better off importing the public API method, in case someone
else were to come and repeat my mistake at another time—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/caolan/async/pull/1140/files/81e888fd40e99c0de0098a7554d6cdafc540c021#r62103119
LGTM2. If there's a tiny DAG library out there that's easy to integrate, maybe. This code has the advantage of already working with what we've defined to be a "graph", rather than having to construct a graph to verify that it's acyclic. |
Good stuff! thanks |
I believe this does the job requested.
The error text does not report which key(s) are involved in the cycle if one is detected. I haven't spent any thought on that, but will try to figure it out if needed.