Skip to content
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

Merged
merged 7 commits into from
Aug 1, 2018
Merged

The Buses #1392

merged 7 commits into from
Aug 1, 2018

Conversation

evgenykochetkov
Copy link
Contributor

@evgenykochetkov evgenykochetkov commented Jul 30, 2018

Closes #1353,
Closes #1364

@evgenykochetkov evgenykochetkov self-assigned this Jul 30, 2018
@evgenykochetkov evgenykochetkov force-pushed the feat-1353-buses branch 2 times, most recently from da3e697 to bf96ea0 Compare July 30, 2018 09:52
@evgenykochetkov evgenykochetkov force-pushed the feat-1353-buses branch 2 times, most recently from 5ad3efd to b768bd3 Compare July 30, 2018 11:12
Copy link
Member

@nkrkv nkrkv left a 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);
Copy link
Member

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.


let jumperizePatch: (Patch.t, matchingBusNodes) => Patch.t;

let jumperizePatchRecursively: (Project.t, Patch.path) => Project.t;
Copy link
Member

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 😭

[@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";
Copy link
Member

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);
Copy link
Member

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

};
},
);
};
Copy link
Member

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

@nkrkv nkrkv changed the title Buses The Buses Jul 30, 2018
@evgenykochetkov evgenykochetkov force-pushed the feat-1353-buses branch 3 times, most recently from 480d6f7 to 98371af Compare July 30, 2018 15:17
Copy link
Member

@nkrkv nkrkv left a 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!

Copy link
Contributor

@brusherru brusherru left a 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.


let toBusNodesByLabel =
nodes
|. List.keep(n => Node.getType(n) == "xod/patch-nodes/to-bus")
Copy link
Contributor

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

[]; /* short-curcuit for optimization */
} else {
nodes
|. List.keep(n => Node.getType(n) == "xod/patch-nodes/from-bus")
Copy link
Contributor

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?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good :)

@@ -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]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in trminls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants