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

Octo review start fails constantly #441

Open
clobrano opened this issue Oct 25, 2023 · 8 comments
Open

Octo review start fails constantly #441

clobrano opened this issue Oct 25, 2023 · 8 comments

Comments

@clobrano
Copy link

Issue Description

Type: bug report

Describe what happened (or what feature you want)

Unable to start/resume a review

Error executing vim.schedule lua callback: ...rano/.local/share/nvim/lazy/octo.nvim/lua/octo/utils.lua:854: BufFilePost Autocommands for "*"..function <SNR>33_on_buffilepost, line 3: Vim(throw):E488: Trailing characters: s:renaming[0] a:
bufnr                                                                                                                                                                                                                                        
stack traceback:                                                                                                                                                                                                                             
        [C]: in function 'nvim_buf_set_name'                                                                                                                                                                                                 
        ...rano/.local/share/nvim/lazy/octo.nvim/lua/octo/utils.lua:854: in function 'wipe_named_buffer'                                                                                                                                     
        ...hare/nvim/lazy/octo.nvim/lua/octo/reviews/file-entry.lua:454: in function '_get_null_buffer'                                                                                                                                      
        ...hare/nvim/lazy/octo.nvim/lua/octo/reviews/file-entry.lua:436: in function 'load_null_buffer'                                                                                                                                      
        ...hare/nvim/lazy/octo.nvim/lua/octo/reviews/file-entry.lua:432: in function 'load_null_buffers'                                                                                                                                     
        ...al/share/nvim/lazy/octo.nvim/lua/octo/reviews/layout.lua:203: in function 'file_safeguard'                                                                                                                                        
        ...al/share/nvim/lazy/octo.nvim/lua/octo/reviews/layout.lua:56: in function 'open'                                                                                                                                                   
        ...ocal/share/nvim/lazy/octo.nvim/lua/octo/reviews/init.lua:148: in function 'initiate'                                                                                                                                              
        ...ocal/share/nvim/lazy/octo.nvim/lua/octo/reviews/init.lua:100: in function 'callback'                                                                                                                                              
        ...ocal/share/nvim/lazy/octo.nvim/lua/octo/reviews/init.lua:71: in function 'cb'                                                                                                                                                     
        ...no/.local/share/nvim/lazy/octo.nvim/lua/octo/gh/init.lua:119: in function ''                                                                                                                                                      
        vim/_editor.lua: in function <vim/_editor.lua:0>                                                                                                                                                                                     
Error detected while processing BufFilePost Autocommands for "*"..function <SNR>33_on_buffilepost:                                                                                                                                           
line    3:                                                                                                                                                                                                                                   
E488: Trailing characters: s:renaming[0] a:bufnr

Describe what you expected to happen

run Octo review start and get the list of changes

How to reproduce it (as minimally and precisely as possible)

Honestly, it's reproducible 100% of the times in my env. Whenever I try to start a review

  1. Octo pr list, select a PR (not necessarily big)
  2. Octo review start

Tell us your environment

NVIM v0.9.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include/luv -I/builddir/build/BUILD/neovim-0.9.2/redhat-linux-build/src/nvim/auto -I/builddir/build/BUILD/neovim-0.9.2/redhat-linux-build/include -I/builddir/build/BUILD/neovim-0.9.2/redhat-linux-build/cmake.config -I/builddir/build/BUILD/neovim-0.9.2/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Anything else we need to know?

There is another issue with Open review start #302, but this seems different to me, also it doesn't depend on the PR size.

@Andrej-Marsic
Copy link

@clobrano have you managed to understand where this stems from? I just installed the plugin and seem to have the same issue.

@clobrano
Copy link
Author

@Andrej-Marsic, unfortunately I didn't have much time to dig into this, but if I remember correctly there was some problem renaming a buffer (not 100% sure though).

@clobrano
Copy link
Author

clobrano commented Feb 2, 2024

Is anyone actually able to use Octo review start?
I watched some walkthrough videos of people using the feature, but I don't get why this isn't working here

@YuvalCarmon-RecoLabs
Copy link

I encountered a similar issue; another plugin had set an autocommand on BufFilePost. After removing the plugin, Octo worked well for me.

@clobrano
Copy link
Author

@YuvalCarmon-RecoLabs, thank you! May I ask you which plugin? I have more than one plugin setting BufFilePost (even fugitive for example)

@YuvalCarmon-RecoLabs
Copy link

For me, it seemed like gitgutter was problematic (I was not using it anymore, so I uninstalled it)

@nikensss
Copy link

I had the same, and disabling gitgutter fixed it for me. I found gitsigns can do the same and doesn't interfere with this plugin.

@clobrano
Copy link
Author

I confirm that s/gitgutter/gitsigns is a good workaround

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

No branches or pull requests

4 participants