-
Notifications
You must be signed in to change notification settings - Fork 24
Build insight UI #339
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
base: main
Are you sure you want to change the base?
Build insight UI #339
Conversation
This PR adds the `jsdoc` plugin for eslinting `skstore`. It is run with the other rules on `npm run lint` Current `jsdoc/...` rules that are still `warn` should be eventually turned to `error`.
No issues found apart from a confusion between exceptions and strings in a few places.
In JS, we use `type ptr = number` to represent pointers. Nothing prevents us from mixing `ptr` and `number`. A first step is to make `ptr` (what Typescript people call) _opaque_ (it corresponds to OCaml `private` types, not abstract types), i.e. it is `number & fake_something` so that we can convert `ptr` to `number` but not the other way around, unless using `as` or `any`, of course... Under undefined circumstances (pun intended), it guarantees we're not mixing both types. The second step is to make `ptr` parametric so we know what they refer to in the Skip world (after being compiled to LLVM and Wasm). Again, it avoids mixing things like `ptr<int>` with `ptr<string>`. Like in C, you can always can between pointer, via `void*` (`ptr<any>`).
I think I got everything in `skstore/ts`, except for a few places at the FFI boundary where a variable truly does refer to a skip handle.
For symmetry with OutputMapper and correspondence with inputs of skip reactive service inputs
config copied from src directory unchanged
and some longer identifier names
This is one sort of case where being able to use tighter types than TJSON would help.
No changes except reordering and adding comments corresponding to the docs: https://www.typescriptlang.org/tsconfig/.
Add a target so that `make update-js-deps` finds every package.json in the repo and updates the versions of dependencies to the latest.
This renders a debug trace given a static JSON file that is generated by SKStore.
Carved out a PR for just the rendering while I continue working on the backend. 'Insight' is what I've been calling the debugger. It's more of a trace than a 'debugger', but in my experimentation this is much more useful - and it will work across machines, platforms, languages, etc. I'll attach some screenshots. |
Here I ask for a trace of a key produced by a left outer join. You can zoom, pan around, adjust the positions of nodes, etc. As you hover over files, the upstream dependencies - including reads performed by the mapper - are highlighted. You can click in to the detail of how any file was produced. These are the collapsed sections. Here we see the logic for the computation, with the full transitive closure. Using this we can understand exactly how the logic operated and why it produced this value. Here are the out of band reads made compared to the input files the DAG fed the mapping function. |
This renders a debug trace given a static JSON file that is generated
by SKStore.