Dataspace pattern matching crashes on missing key #2

Closed
opened 2022-03-18 10:37:27 +00:00 by tonyg · 0 comments
Contributor

If I change the config object to contain something without the actions key, e.g.

$cap <config {}>

or

$cap <config { ac2tions: [ ... ] } >

then uri_runner crashes:

/home/tonyg/src/xdg_open_ng/src/uri_runner.nim:57 uri_runner
/nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1956 runForever
/nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1653 poll
/nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1394 runOnce
/nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:234 processPendingCallbacks
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:429 :anonymous
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:440 run
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:251 :anonymous
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:87 publish
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/dataspaces.nim:21 publish
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:265 add
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:246 adjustAssertion
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:132 modify
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:129 walk
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:129 walk
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:120 walk
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:115 walk
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:19 projectPaths
/home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:14 projectPath
/home/tonyg/.nimble/pkgs/preserves-3.2.0/preserves.nim:248 []
Error: unhandled exception: value not in Preserves dictionary [KeyError]
If I change the config object to contain something without the `actions` key, e.g. $cap <config {}> or $cap <config { ac2tions: [ ... ] } > then `uri_runner` crashes: ``` /home/tonyg/src/xdg_open_ng/src/uri_runner.nim:57 uri_runner /nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1956 runForever /nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1653 poll /nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:1394 runOnce /nix/store/jcj3yr4j8j6pkbblcbvkmzlabgls2wr9-nim-unwrapped-1.6.4/nim/lib/pure/asyncdispatch.nim:234 processPendingCallbacks /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:429 :anonymous /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:440 run /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:251 :anonymous /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/actors.nim:87 publish /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/dataspaces.nim:21 publish /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:265 add /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:246 adjustAssertion /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:132 modify /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:129 walk /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:129 walk /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:120 walk /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:115 walk /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:19 projectPaths /home/tonyg/.nimble/pkgs/syndicate-1.2.0/syndicate/skeletons.nim:14 projectPath /home/tonyg/.nimble/pkgs/preserves-3.2.0/preserves.nim:248 [] Error: unhandled exception: value not in Preserves dictionary [KeyError] ```
ehmry closed this issue 2022-03-18 15:15:28 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ehmry/syndicated-open#2
No description provided.