KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
366 stars 29 forks source link

Example Core Dump with KCL Error #2842

Closed dshaw closed 2 months ago

dshaw commented 3 months ago

Core Dump with KCL Error

In a modeling-app core dump file, KCL Errors are an array under KCL Manager in the Client State section:

{
  "client_state": {
    "kcl_manager": {
      "kcl_errors": []
    }
  }
}

To view a KCL Error in a core dump or check for errors from the command line make sure you have curl and jq installed:

curl 'URL' | jq '.client_state.kcl_manager.kcl_errors'

To grab the URL for the core dump in this issue, expand the Core Dump section where you can right click and copy the link address for coredump-fc51898c-c4d5-4869-9e82-9a20c33df444.json:

curl 'https://public.blob.zoo.dev/f1969be9-4411-428b-b8a6-3690230a6756/modeling-app/coredump-fc51898c-c4d5-4869-9e82-9a20c33df444.json' | jq '.client_state.kcl_manager.kcl_errors'

If you download the file, cat the file and pass it jq:

cat 'f1969be9-4411-428b-b8a6-3690230a6756/modeling-app/coredump-fc51898c-c4d5-4869-9e82-9a20c33df444.json' | jq '.client_state.kcl_manager.kcl_errors'

This will output:

[
  {
    "kind": "lexical",
    "sourceRanges": [
      [
        640,
        641
      ]
    ],
    "msg": "found unknown token '🦄'"
  }
]

Screenshot

Core Dump [coredump-fc51898c-c4d5-4869-9e82-9a20c33df444.json](https://public.blob.zoo.dev/f1969be9-4411-428b-b8a6-3690230a6756/modeling-app/coredump-fc51898c-c4d5-4869-9e82-9a20c33df444.json) Reference ID: fc51898c-c4d5-4869-9e82-9a20c33df444