Skip to content
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

Merge v1.7.2 #9

Merged
merged 59 commits into from
Mar 30, 2023
Merged

Merge v1.7.2 #9

merged 59 commits into from
Mar 30, 2023

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Mar 7, 2023

  1. This reverts 3 workarounds as they've been addressed upstream:
  2. And then it merges changes until the v1.7.2 release

So content-wise, it's now inline with the upsteam's v1.7.2 release.

Note: ruby#947 didn't resolve the issue for DAP so I added ruby#950 for it, which I will open another PR to patch issues-workaround later.

@st0012 st0012 requested a review from a team March 7, 2023 07:57
ono-max and others added 10 commits March 8, 2023 02:45
- Display the greeting message regardless of the status of invocation of
  chrome.

  This allows coming back to the debugger on a new tab when the window
  process by `UI_CDP.run_new_chrome` is killed.

- Handle `Errno::ESRCH` in `UI_CDP.cleanup_reader`.

  When the process by `UI_CDP.run_new_chrome` is killed, re-killing it
  breaks your debugging session and in turn the "debugee".
`UI_ServerBase#greeting` calls `#puts` with no arguments, this
breaks reconnections to the debugger.
`Session#process_protocol_request` gracefully handles `Errno::ENOENT`
when `eval`-ing `$FILENAME`, and it doens't exist.
When debug.gem tries to send response from multiple threads, the socket connection is closed. I confirmed this bug when using custom request from vscode-rdbg
Because Errno::EPIPE is rescued while sending message to socket, protocol_test_case_test.rb does not pass. protocol_test_case_test.rb had been passed because ReaderThreadError was occurred and the debuggee process was still alive. Here is a scenario. After closing socket, terminated event was sent. However socket was closed, so debuggee process raised Errno::EPIPE and debugggee process was still alive. The test framework detected the status and failed.

Thus I fixed so that the test framework does not kill the debuggee process unexpectedly.
Methods ``respond``, ``respond_fail`` and ``fire_event`` can be aliased to ``send_response``, ``send_fail_response`` and ``send_event``, respectively.
`@session_server` should be assigned at first.

`@session_server = Thread.current` in the session thread does not
work because the creator thread can access to `@session_server`
before it.
  Found by running `rubocop --only=Lint/UselessAssignment`
ono-max and others added 15 commits March 24, 2023 17:00
UI_DAP -> Session: custom_dap_request_...

Session -> ThreadClient: custom_dap_request_event_...

Add "request_event" prefix to clarify it is a response (not Events in DAP)
on `, debug_command` form.
Breakpoints should be remained on reloaded files. To make sure
maintaining loaded file names.

fix ruby#870
1. `remote_info.failed_process` stores symbol but we only use the value's
   presence to check if the process is force-killed.
2. The force-killed status is directly controlled by `kill_safely` through
    `kill_remote_debuggee`, which is directly called right before we check
    the status with `remote_info.failed_process`.

Combining the two, we can just let `kill_safely` and `kill_remote_debuggee` to
return the force-killed status and not storing it in `remote_info`, which
already contains a bunch of information.

This also eliminates the need to pass `test_info` to `kill_safely`, which
makes related code easier to understand and maintain.
The generated result in ThreadClient is passed as "result". We usually use it when returning responses to VS Code in Session class
When a thread keeps a lock, and REPL runs a code which needs the
lock, other threads should make a progress to release the lock.

fix ruby#877
From investigation by @ko1-san, the path to set breakpoints seems to be sent in "url" field when debugging in different environment such as WSL(running debuggee) and Windows(running Chrome DevTools). I supported "url" field in this PR.
Without this patch, `rdbg -v target.rb` prints version and terminates
the process. With this pach, `-v` prints version and starts debugging
for `target.rb`.

If no filename is given, terminates the process.
@st0012 st0012 force-pushed the st0012-merge-master branch 2 times, most recently from 0615a13 to 7887283 Compare March 29, 2023 15:42
@st0012 st0012 changed the title Merge master Merge v1.7.2 Mar 29, 2023
@st0012 st0012 requested review from a team, vinistock and dirceu March 29, 2023 16:01
@st0012
Copy link
Member Author

st0012 commented Mar 29, 2023

For some reasons the CI stopped being triggered but I have no idea why 😫

@andyw8
Copy link

andyw8 commented Mar 29, 2023

https://www.githubstatus.com/ is reporting some problems.

@st0012
Copy link
Member Author

st0012 commented Mar 29, 2023

@andyw8 Thanks so much! Never thought to take GH's issues into consideration, but now I will 😠

@st0012 st0012 merged commit 2988e38 into issues-workaround Mar 30, 2023
@st0012 st0012 deleted the st0012-merge-master branch March 30, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.