Uh oh!
There was an error while loading. Please reload this page.
Proposal: Refactor server_dap to use command-registration style - #931
Proposal: Refactor server_dap to use command-registration style#931andyw8 wants to merge 2 commits into
server_dap to use command-registration style#931Conversation
server_dap to use command-registration styleserver_dap to use command-registration styleko1
commented
Mar 22, 2023
Thank you for the patch. |
@ko1 Thank you for the feedback. I will give some additional context about why we wanted to make this change: Within the Shopify Ruby DX team, we aim to build a better understanding of how Shopify developers are using tooling, by adding telemetry/metrics reporting. For We are curious, what's the reason for preferring Regardless, there is a different approach we could take that would result in a much smaller change. We could extract the body of the defprocesswhilereq=recv_requestprocess_request(req)endenddefprocess_request(req)casereq['command']when'launch'# ...# etc. for all the existing `when` clausesendendWould you be open to something like that? |
andyw8
commented
Apr 11, 2023
@ko1 Just wondering if you have any further thoughts on this? |
ko1
commented
May 4, 2023
I don't think "difficult to maintain" on this case but it is my preferences.
It is acceptable so I'll make another PR for it and close this PR. Thank you. |
and we can intercept each requests. See #931
and we can intercept each requests. See #931
The current implementation of
server_dap.rbuses a very longcasestatement.We (the Ruby Developer Experience team at Shopify) would like to propose changing this better align with the
register_commandapproach already used insessions.rb. This will allow the longcasestatement to be avoided, and will provide better consistency within the project.Please take a look at a suggested approach. The behaviour should be identical to as it was before. We look forward to hearing your feedback.
We recommend viewing the PR with whitespace changes ignored: https://github.com/ruby/debug/pull/931/files?w=1