-
Notifications
You must be signed in to change notification settings - Fork 119
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
The Buses #1392
The Buses #1392
Conversation
da3e697
to
bf96ea0
Compare
5ad3efd
to
b768bd3
Compare
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.
🔥 No chances for such a big PR to be approved right away, right? :)
|
||
let fromDict: Js.Dict.t('v) => t('v); | ||
|
||
let toDict: t('v) => Js.Dict.t('v); |
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.
Every symbol in a *.rei
should have a doc-string, even if it is quite simple.
packages/xod-project/src/Buses.rei
Outdated
|
||
let jumperizePatch: (Patch.t, matchingBusNodes) => Patch.t; | ||
|
||
let jumperizePatchRecursively: (Project.t, Patch.path) => Project.t; |
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.
All *.rei
symbols have to be documented 😭
packages/xod-project/src/Link.re
Outdated
[@bs.module ".."] | ||
external create : | ||
(~toPin: Pin.key, ~toNode: Node.id, ~fromPin: Pin.key, ~fromNode: Node.id) => | ||
t = | ||
"createLink"; | ||
|
||
[@bs.module ".."] external getId : t => id = "getLinkId"; |
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.
Chris Carter would call it [@bs.outthere]
👽
|. Belt.Map.String.remove(pinKey); | ||
|
||
if (Belt.Map.String.isEmpty(updatedNodeTypes) ) { | ||
drs |. Belt.Map.String.remove(nodeId); |
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.
Bet it will be more clear to just open
the Belt
… For the whole module
}; | ||
}, | ||
); | ||
}; |
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.
EOL is missing.
😮 and a corresponding *.rei
is missing too
1492c38
to
8ba44f1
Compare
480d6f7
to
98371af
Compare
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.
👏
Vote for moving the jumper
node to xod/patch-nodes
and LGTM!
8b450a7
to
dd0f352
Compare
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.
Just two remarks, in the rest LGTM.
packages/xod-project/src/Buses.re
Outdated
|
||
let toBusNodesByLabel = | ||
nodes | ||
|. List.keep(n => Node.getType(n) == "xod/patch-nodes/to-bus") |
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.
Better use constant or function from JS-part of xod-project
packages/xod-project/src/Buses.re
Outdated
[]; /* short-curcuit for optimization */ | ||
} else { | ||
nodes | ||
|. List.keep(n => Node.getType(n) == "xod/patch-nodes/from-bus") |
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.
The same one.
@@ -1074,6 +1075,7 @@ const getDependenciesMap = (project, patchPaths, depsMap) => { | |||
const currentPatchDeps = R.compose( | |||
R.map(Node.getNodeType), | |||
Patch.listNodes, | |||
// TODO: make safer? |
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.
Sounds good :)
dd0f352
to
def54a2
Compare
packages/xod-project/src/patch.js
Outdated
@@ -1156,7 +1158,7 @@ export const isGenuinePatch = def( | |||
'isGenuinePatch :: Patch -> Boolean', | |||
R.compose( | |||
R.not, | |||
R.anyPass([isAmong(BUILT_IN_PATCH_PATHS), isTerminalPatchPath]), | |||
R.anyPass([R.has(R.__, BUILT_IN_PATCHES_EXCEPT_TRMINALS), isTerminalPatchPath]), |
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.
Typo in trminls
e67683d
to
def54a2
Compare
…ackages, set up root bsconfig.json
…f deprecated Js.Result
works just like Ramda's groupBy
def54a2
to
424614b
Compare
Bug was introduced in #1392
Closes #1353,
Closes #1364