From ac37954d2fb08f55fd62030408a6cd85d4aea94b Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Thu, 15 Feb 2024 22:22:23 +0000 Subject: [PATCH 1/3] Fix traceback when adding a watch without current frame --- python3/vimspector/variables.py | 4 +++ tests/variables.test.vim | 58 ++++++++++++++++++++++++++++----- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index 97e004f4e..181fbde95 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -176,6 +176,10 @@ def SetCurrentFrame( self, connection, frame ): elif self.connection != connection: return + if frame is None: + # Evaluation in a context where there is no current frame. + return + self.expression[ 'frameId' ] = frame[ 'id' ] @staticmethod diff --git a/tests/variables.test.vim b/tests/variables.test.vim index 1b1e17175..ab0747eed 100644 --- a/tests/variables.test.vim +++ b/tests/variables.test.vim @@ -19,15 +19,15 @@ function! ConsoleBufferName() endfunction function! s:StartDebugging( ... ) - if a:0 == 0 - let config = #{ - \ fn: s:fn, - \ line: 23, - \ col: 1, - \ launch: #{ configuration: 'run' } - \ } - else - let config = a:1 + let config = #{ + \ fn: s:fn, + \ line: 23, + \ col: 1, + \ launch: #{ configuration: 'run' } + \ } + + if a:0 > 0 + call extend( config, a:1 ) endif execute 'edit' config.fn @@ -1265,3 +1265,43 @@ EOF call vimspector#test#setup#Reset() %bwipe! endfunction + +function! Test_WatchAfterExit() + call s:StartDebugging( #{ + \ col: v:null, + \ line: 3, + \ fn: 'testdata/cpp/simple/tiny.c', + \ launch: #{ configuration: 'CodeLLDB' } + \ } ) + + call vimspector#Continue() + call WaitForAssert( {-> + \ AssertMatchList( + \ [ + \ '+ Thread [0-9]\+: .* (terminated)', + \ ], + \ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ), + \ 1, + \ '$' ) + \ ) + \ } ) + + " Add a wtch + call vimspector#AddWatch( 'res' ) + + call WaitForAssert( {-> + \ AssertMatchList( + \ [ + \ 'Watches: ----', + \ 'Expression: res', + \ ' \*- Result: .*', + \ ], + \ getbufline( winbufnr( g:vimspector_session_windows.watches ), + \ 1, + \ '$' ) + \ ) + \ } ) + + call vimspector#test#setup#Reset() + %bwipe! +endfunction From 39e6b32bf6821677f67801597bbbe2be2ac18587 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Thu, 15 Feb 2024 23:13:05 +0000 Subject: [PATCH 2/3] Stop running neovim tests on macOS as they are slow and flaky for some reason --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 90c66d4e2..18812f293 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -114,7 +114,9 @@ jobs: matrix: runtime: - vim - - nvim + # - nvim ; MacOS in GHA is so slow, this seems to cause lots of + # flakiness for neovim and I have like 0 patience with trying to + # understand why. steps: - uses: actions/checkout@v3 From 4b3cd38750694ed3947821eadfdbb592081f7fa7 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Thu, 15 Feb 2024 23:49:24 +0000 Subject: [PATCH 3/3] Ignore macOS neovim tests in mergify --- .mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 5ec695ef9..10df2e73e 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -9,7 +9,7 @@ queue_rules: - status-success=Linux (vim) - status-success=Linux (nvim) - status-success=MacOS (vim) - - status-success=MacOS (nvim) + #- status-success=MacOS (nvim) pull_request_rules: - name: Merge owner PR when all checks passed @@ -26,7 +26,7 @@ pull_request_rules: - status-success=Linux (vim) - status-success=Linux (nvim) - status-success=MacOS (vim) - - status-success=MacOS (nvim) + #- status-success=MacOS (nvim) actions: &merge-actions queue: method: merge @@ -61,7 +61,7 @@ pull_request_rules: - status-success=Linux (vim) - status-success=Linux (nvim) - status-success=MacOS (vim) - - status-success=MacOS (nvim) + #- status-success=MacOS (nvim) actions: <<: *merge-actions comment: