Commit Graph

204 Commits

Author SHA1 Message Date
Kirill Shumilov
034ca0030d test(xod-project): cover new functions isDeprecatedPatch and getDeprecationPatchReason with tests 2018-03-21 12:37:20 +03:00
Evgeny Kochetkov
f9cfce6c33 feat(xod-project, stdlib, workspace): use xod/core/cast(*,*) instead of xod/core/cast-*-to-* 2018-03-20 15:50:38 +03:00
Kirill Shumilov
f6cdb1fe1d test(xod-project): add tests for validateLinkPins function 2018-03-19 13:36:57 +03:00
Kirill Shumilov
7787a4e8a6 feat(xod-project): validate links for compatibility of pin types and show error on transpile. Tweak errors in xod-project to show it with title in the IDE. Show "Dead reference error" only in actual errors. 2018-03-19 13:36:57 +03:00
Evgeny Kochetkov
0ef2e2f1a0 feat(xod-project, xod-client): allow to create abstract nodes 2018-03-16 15:41:38 +03:00
Kirill Shumilov
6aa2cfc86f feat(xod-project): allow to specify types in the patch path (E.G. @/some-patch(string,number)) and fix not working validation of patch paths 2018-03-15 11:54:14 +03:00
Evgeny Kochetkov
e6ab08e297 chore(infra): format code with prettier
Just `yarn lint  --fix`
2018-03-05 17:59:03 +03:00
Evgeny Kochetkov
f82d813240 fix(xod-project): fix links orientation when expanding variadic patches 2018-02-28 13:05:56 +03:00
Kirill Shumilov
2decb1c6e0 fix(xod-project): fix rendering of one superfluous variadic group (arityLevel === 2 means that there is only one additional pin) 2018-02-27 18:53:35 +03:00
Kirill Shumilov
e6f50bcf87 feat(xod-project, xod-client): compute and render variadic pins for Nodes with arityLevel > 1 and allow to link them 2018-02-27 17:54:35 +03:00
Evgeny Kochetkov
775498a9f2 feat(xod-project): expand variadic nodes
Closes #1065
2018-02-26 20:13:05 +03:00
Kirill Shumilov
4e510b7957 feat(xod-project): add basic features for variadics: new types, getters/setters, path utils, built-in patches, function that computes variadic Pins and validates variadic Patch 2018-02-20 15:38:17 +03:00
Kirill Shumilov
21b726460f feat, refactor(xod-project, xod-fs, xod-client, xod-client-electron, xod-client-browser): unify save/load UX 2018-01-30 19:28:26 +03:00
Evgeny Kochetkov
399a6a48b2 fix(xod-project): forbid using non-native patches as entry points 2018-01-18 14:03:28 +03:00
Kirill Shumilov
24a416118c feat(xod-project): add functions that returns lists of installed library names, of used libraries (somewhere in patches) and missed library names (based on previvous two functions), add PatchPathUtil function getOwnerName 2017-11-24 14:05:54 +03:00
Kirill Shumilov
4e52e9a72b chore(xod-project): update chai to latest 4.1.2 version, fix few tests (breaking changes + some tests falsy passed in the past) 2017-11-24 14:05:54 +03:00
Evgeny Kochetkov
d9e787a07a fix(xod-project): don’t propagate bound values to occupied outputs 2017-11-21 19:25:09 +03:00
Victor Nakoryakov
4a9bfd3d74 tweak(xod-project): change automatic pin naming scheme
IN_0 → IN1
IN_1 → IN2
OUT_7 → OUT8
2017-11-17 11:42:23 +03:00
Evgeny Kochetkov
65030ac698 refactor(xod-project, xod-fs, xod-arduino): single target platform, single implementation file
- `xod-project`

  - no notion of different impl types
  - because there is only one kind of implementation left, no need to store them in `impls`, it can be extracted straight from attachments

  - API changes:
    - removed:
      - `listImpls`
      - `hasImpls`
      - `getImplByArray`

    - added:
      - `hasImpl :: Patch -> Boolean`
      - `setImpl :: Source -> Patch -> Patch`

    - changed signatures:
      - `getImpl` is now `Patch -> Maybe Source`
      - `hasImpl` is now `Patch -> Boolean`
      - `flatten` is now `Project -> PatchPath -> Either Error Project`

- `xod-fs`
  - does not know about implementation files — they all are just attachments

+ minor changes in other backages
2017-11-15 13:16:21 +03:00
Kirill Shumilov
73a0f4f3a8 feat(xod-project, xod-client): add feature that broken project could be opened, but broken patches, nodes and links will be marked as dead (special look and etc)
Squashed commits:
[4609d47] fix(xod-client): fix React warning about empty children property (in UnknownPinWidget)
[62345a3] refactor(xod-project): add accosPatch and assocPatchList unsafe versions for surviving
[fe779e9] test(xod-project): add test cases for project surviving
[b731d1d] refactor(xod-project): rename `getPinsForPatch` to `getPinsForNode`, cause really we're getting pins for passed Node
[5485746] tweak(xod-client, xod-client-electron): show proper message for transpiling patch with broken content
[e589088] feat(xod-client): mark patches with broken content in the Project Browser with special icon
[9e7cfa5] feat(xod-client, xod-project): add creating missed pins into patches and mark links, that connected with unexistent pins, as broken
[b9d13cd] feat(xod-client): make Inspector works properly when selecting broken nodes
[29063a0] feat(xod-client): add broken style for links, that connected with broken nodes
[0b8e5ef] feat(xod-client, xod-project): make first step in project surviving: nodes that uses type of unexistent patch could be rendered with pins, that have links, with a special look
2017-10-18 15:55:05 +03:00
Kirill Shumilov
44577c03a4 feat(xod-arduino-deploy, xod-deploy, xod-client, xod-client-electron): add interactive debug session with watch nodes, optimized log and etc (+31 squashed commits)
Squashed commits:
[ca50efb] refactor(xod-client, xod-arduino-deploy, xod-client-electron): handle lost connection (unplug device), make some small fixes
[8c9fbce] tweak(xod-client-electron): add retries to find device after upload (3 times with 300ms delay)
[8c77fce] fix(xod-client-electron): fix adding an error message into debugger log
[c0668c1] refactor(xod-client, xod-client-electron): add throttling to send data readed from serial port and updating log by list of messages instead of appending each message
[9528c6e] refactor(xod-arduino, xod-client, xod-client-electron): make fixes in accordance with comments to PR
[117996b] refactor(xod-client): simplified selecting renderer by message type in the Log container
[512b74f] refactor(xod-arduino): revert XOD_TRACE functions to use only for debug runtime, watch-node uses DEBUG_SERIAL, updated fixtures and etc
[7b92c98] chore(xod-client): remove dispatching no longer existing action (setMode)
[cb38db1] refactor(xod-arduino): split transpiling into two functions: transformProject and transpile, add function to get nodeIdsMap from transformed project, use last one instead of pushing it through a long pipes of calls
[01c3f2e] tweak(xod-client): show xod message delimiter in the log
[360f216] chore(xod-client): change caption of button "Stop debug session" -> "Stop debug"
[531c280] style(xod-client): change colors of watch nodes, remove ellipsis from watch node values, change color of error and success message borders
[bb3c5df] fix(xod-client): fix panning mode to show nodeValues in debug session interactively
[7fac400] tweak(xod-client): sync offsets of patches between tabs (if user pans debug tab -> patch tab panned too, and vice versa)
[086d863] tweak(xod-client): stop debug session when debugger tab was closed
[eccc14a] tweak(xod-client): pass offsets between patchTab and debuggerTab, reopen original patch on debugger tab close
[83c3090] test(xod-client-electron): fix functional test and remove fixture (take it from workspace)
[f87fb2d] tweak(xod-client): tweak closing tab to prevent switching to another tab if closed another one
[c17cc0f] refactor(xod-client): remove editor modes from redux store, make modes depends on tab type
[92ce1df] refactor(xod-client): add tab types, add debug tab type and styles, handle opening and closing this tab on debug start/stop
[09af9af] refactor(xod-client): refactored tabs to contain an unique id and patchPath, instead of storing two entities in one property
[31991f7] refactor(xod-client): optimize rendering logs, add Debugger into storybook, fix one possible bug in the reducer
[7355928] refactor(xod-client): move log of Debugger into a separate container
[30d36c5] refactor(xod-client): optimize debugger selectors
[9615450] feat(xod-client): pass values of watch nodes into view
[34b40d0] refactor(xod-client): move rendering of node bodies and some parts into small components, add WidgetNodeBody component
[18f4e75] feat(xod-client): add new editor mode: debugging
[6c6d9bd] feat(xod-arduino, xod-client): store map of nodeIds to topologically sorted index of nodes in the redux state
[492caea] feat(xod-arduino, xod-project): remove debug nodes on transpilation without debug mode, update fixtures and tests
[63a8083] refactor(xod-arduino, xod-clients): update debug flags in runtime, allow to switch flags in the transpiler (using options object) and integrate it into clients
[01cfd83] feat(xod-arduino, workspace): implement watch node and change debug flags in the runtime and configuration template
2017-10-03 14:26:28 +03:00
Kirill Shumilov
9eb9f9053a feat(xod-client, xod-client-electron): add "debug session" feature and debugger pane 2017-09-21 20:35:19 +03:00
Victor Nakoryakov
981902fff6 optimize(xod-arduino): toposort nodes in-place 2017-08-30 01:00:52 +03:00
Victor Nakoryakov
0ad266c1ed optimize(xod-project): inject @@type hints into entities to speed up type checks
Closes #716
2017-08-16 13:27:47 +03:00
Evgeny Kochetkov
a4d1a439f9 fix(xod-project): fix bound value propagation to deeply nested patches
Closes #695
2017-08-08 18:25:47 +03:00
Evgeny Kochetkov
b1b8a2858d fix(xod-project): append pin key to cast node ids
Fixes #701
2017-08-02 12:57:18 +03:00
Evgeny Kochetkov
ad0d3583cd feat(xod-project): add Comment type, add comments field for Patch and all nececssary functions 2017-08-01 18:13:16 +03:00
Victor Nakoryakov
bada494260 fix(rt/c++): missing entries of refactoring 6d20c35
Some Inputs::XXX and Outputs::YYY were not renamed to input_XXX and
output_YYY
2017-07-31 13:51:11 +03:00
Victor Nakoryakov
54b138dc01 feat(rt/c++): hide State* arg of evaluate
The minority of nodes that deal with internal state now should call
`getState` to access their state. On other end all stateless nodes don’t
have to carry `state` argument in their `evaluate` signature.

Closes #565
2017-07-28 12:18:31 +03:00
Evgeny Kochetkov
a0283dc63b fix(xod-project): propagate bound values to nested patches 2017-07-27 21:06:09 +03:00
Evgeny Kochetkov
ca2c2e0b60 test(xod-project): throw away tests that depend on hm-def 2017-07-25 14:22:34 +03:00
Evgeny Kochetkov
01530e6c47 refactor(xod-project, xod-fs): use ‘validateSanctuaryType’ util for type validation 2017-07-20 12:51:02 +03:00
Evgeny Kochetkov
9b8c08b26c feat(xod-project): add utils to add missing optional fields and omit empty optional fields 2017-07-20 12:11:18 +03:00
Kirill Shumilov
c56cb67a2b fix(xod-project): extract default values of pins into constant nodes 2017-07-17 19:24:40 +03:00
Kirill Shumilov
01b0b3e151 test(xod-project): remove canCastTypes tests (we're don't have to test constants) 2017-07-13 20:20:26 +03:00
Evgeny Kochetkov
d9a0394133 refactor(xod-project, xod-js): get rid of getConstantPatchPath and isConstantPatchPath utils, use constants instead 2017-07-12 14:41:17 +03:00
Evgeny Kochetkov
4933d1ae51 test(xod-project): move constantPatches to a separate fixture file 2017-07-12 14:41:17 +03:00
Evgeny Kochetkov
1e643ea741 feat(xod-project): support binding input pulses to ‘ON_BOOT’ and ‘CONTINUOUSLY’ 2017-07-12 10:59:41 +03:00
Evgeny Kochetkov
4a24f925df test(xod-project): tests for existing behaviour of ‘extractBoundInputsToConstNodes’ 2017-07-11 20:05:41 +03:00
Kirill Shumilov
c6b7d94f6d feat(xod-project): add upsertNodes and upsertLinks functions, that associates a list of nodes/links into Patch 2017-07-10 14:50:06 +03:00
Kirill Shumilov
8d2c731194 feat(xod-project): add attachments type and property to Patches 2017-07-10 14:48:26 +03:00
Evgeny Kochetkov
8bbbd6f8da fix(xod-project, xod-arduino, xod-js): report an error when loops in nodes graph are detected instead of silently failing
Closes #645.
2017-07-06 13:09:20 +03:00
Evgeny Kochetkov
9d2038411f fix(xod-project): allow patches to be nested more than 2 levels deep
Closes #646.
Closes #643.
2017-07-06 09:26:14 +03:00
Evgeny Kochetkov
a03c6c87ea tweak(xod-project, xod-fs, xod-client): ensure that Project has a valid version 2017-06-20 20:24:18 +03:00
Victor Nakoryakov
44e6b48f0f fix(xod-project): fix isTerminalPatch as it used to give false positives
Now implementation is solid and it has no chance to confuse cast-* nodes
with termintal-* nodes
2017-06-09 16:27:24 +03:00
Kirill Shumilov
f1d4b535fe fix(xod-project): fix assocInjectedPinToNodeByLink overwrites bound values if Node was linked with patch-node and add test 2017-06-06 19:53:15 +03:00
Kirill Shumilov
0a9ec627a7 test(xod-project): add test for error message if Node refers to non-existent patch 2017-06-06 18:44:28 +03:00
Kirill Shumilov
c52791503a feat(xod-project): add functions and tests for them: assocPatchList, resolveNodeTypesInProject, setNodeType 2017-06-05 19:21:33 +03:00
Kirill Shumilov
7b98d745f0 feat(xod-project): add resolvePatchPath function 2017-06-05 19:21:33 +03:00
Kirill Shumilov
ae44e47f9d feat(xod-project): add function isPulsePin to check is Pin Type equal to Pulse 2017-06-05 18:19:37 +03:00