Closed FarsanRashid closed 10 months ago
Hi, thanks for reporting this!
I can't seem to reproduce this in Vim on Linux, so it's either related to macOS or to your configuration. Have you tried reproducing this with a minimal vimrc
? Also, does anything happen at all when invoking :CMakeGenerate
? Does the Vim-CMake window open? Is the content of the buffer in the Vim-CMake window completely empty?
As I said, this might very well be related to macOS, so I will also try to get a hold of a macOS system and try to reproduce your issue.
Hi, I tried with the following minimal .vimrc
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
Plug 'cdelledonne/vim-cmake'
call plug#end()
and recored the screen
https://github.com/cdelledonne/vim-cmake/assets/8214491/db39f4b3-48a2-4eca-9661-e446ceff0755
As you can see, both CMakeGenerate
and CMakeBuild
opens the console window. I believe the content of the buffer in the Vim-CMake window is completely empty.
Thanks for the additional input.
The issue is subtle, and it seems to indeed only manifest itself on macOS. Basically using the built-in Vim function writefile()
to write to Vim-CMake's console is not working properly. I added a workaround on branch 93-console-window-is-blank-for-cmakegenerate-and-cmakebuild
— can you please try and check out that branch and see if the issue is resolved?
Working for both CMakeGenerate
and CMakeBuild
.
Thanks a lot!
Cool, I'll merge on master
then!
Thank you for creating this nice plugin!
Bug description
console window does not show output of cmake for
CMakeGenerate
andCMakeBuild
. cmake is invoked and works as expected, only logs are not shown in console window. The issue is similar to an old issue.To Reproduce
Run :CMakeGenerate or :CMakeBuild with default config
Expected behavior
cmake logs are shown in console window as shown in README
Other info
:echo cmake#GetInfo().version
): 0.15.0cmake --version
): 3.28.1Additional context
CMakeRun
shows output of executable in overlay window. Not familiar with vimscript but looks likeCMakeRun
is invoking function! s:terminal.RunOverlay whereasCMakeBuild
andCMakeGenerate
invokes function! s:terminal.Runlog from log_level TRACE
[2023-12-21 22:35:48] [DEBUG] API invoked: cmake#Build(0, ['alternating_array']) [2023-12-21 22:35:48] [DEBUG] Invoked: build.Build(0, ['alternating_array']) [2023-12-21 22:35:48] [DEBUG] Invoked: terminal.Run(['cmake', '--build', 'build', '--target', 'alternating_array'], 'BUILD', {'callbacks_succ': [function('175_GenerateQuickfix'), function('175_RefreshTargets')], 'autocmds_pre': ['CMakeBuildPre'], 'autocmds_succ': ['CMakeBuildSucceeded'], 'callbacks_err': [function('175_GenerateQuickfix'), function('175_RefreshTargets')], 'autocmds_err': ['CMakeBuildFailed']})
[2023-12-21 22:35:48] [DEBUG] Invoked: terminal.CloseOverlay()
[2023-12-21 22:35:48] [DEBUG] Invoked: terminal.Open(v:false, v:false)
[2023-12-21 22:35:48] [DEBUG] Executing autocmd CMakeBuildPre
[2023-12-21 22:35:49] [DEBUG] Invoked console exit callback
[2023-12-21 22:35:50] [DEBUG] Callback invoked: 175_GenerateQuickfix()
[2023-12-21 22:35:50] [DEBUG] Invoked: s:quickfix.Generate()
[2023-12-21 22:35:50] [DEBUG] Replaced existing Quickfix list
[2023-12-21 22:35:50] [DEBUG] Callback invoked: 175_RefreshTargets()
[2023-12-21 22:35:50] [DEBUG] Executing autocmd CMakeBuildSucceeded