arosien commented on PR #696:
URL: https://github.com/apache/daffodil-vscode/pull/696#issuecomment-1633110677

   > I really cannot understand this code without further study of the whole 
cats effect approach. My problem not yours, but my review is cursory as a 
result. I can't spot errors in this code.
   
   I understand. I am currently working on a README to detail the backend 
architecture, which should help some of this.
   
   For this particular bug though, it boils down to two concurrent computations 
going on in the `Parse` code:
   - the ongoing Daffodil parse (`parsing`) which emits the infoset to some 
sink, while also pushing events into local queues; and
   - a computation (`deliverParseData`) that transforms parse events into the 
current backend debugger state (stacktrace, etc.).
   - 
   What we want is that if there is an error during `parsing`, we should emit a 
DAP event with the error. However the previous code didn't do anything like 
that, and would incorrectly finalize the DAP event queue when the 
`deliverParseData` computation completed. (which in practice handled normal 
shutdown scenarios just fine)
   
   Instead we now match when the error happened during `parsing`, enqueue the 
proper DAP event so the client will know about the problem, and then finalize 
the DAP event queue since we current shutdown the debugging session when such 
an error occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to