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

avoid deprecated health api #94

Merged
merged 1 commit into from
Aug 28, 2024
Merged

avoid deprecated health api #94

merged 1 commit into from
Aug 28, 2024

Conversation

woeps
Copy link
Contributor

@woeps woeps commented Aug 20, 2024

This PR fixes #93: Deprecated (since neovim 0.10) health#report_* calls got replaced with v:lua.vim.health.* calls.

Tested in neovim 0.11.

@woeps woeps changed the title avoid deprecated health api - fix rhysd/git-messenger.vim#93 avoid deprecated health api - fix #93 Aug 20, 2024
@woeps woeps changed the title avoid deprecated health api - fix #93 avoid deprecated health api Aug 20, 2024
@rhysd
Copy link
Owner

rhysd commented Aug 21, 2024

Please ignore CI. The actions used by the CI workflow are too old and it is not related to changes of this PR.

@@ -1,8 +1,8 @@
function! s:check_job() abort
if !has('nvim') && !has('job')
call health#report_error('Not supported since +job feature is not enabled')
call v:lua.vim.health.error('Not supported since +job feature is not enabled')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not reached by Neovim. So this modification is not needed.

@@ -63,13 +63,13 @@ function! s:check_vim_version() abort
endif

if v:version < 800
call health#report_error(
call v:lua.vim.health.error(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

\ 'Your Vim version is too old: ' . v:version,
\ 'Please install Vim 8.0 or later')
return
endif

call health#report_ok('Vim version is fine: ' . v:version)
call v:lua.vim.health.ok('Vim version is fine: ' . v:version)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@rhysd
Copy link
Owner

rhysd commented Aug 22, 2024

I've fixed CI. Please rebase this branch onto the latest master branch so that tests can be run properly.

@woeps
Copy link
Contributor Author

woeps commented Aug 22, 2024

I've fixed CI. Please rebase this branch onto the latest master branch so that tests can be run properly.

Nice, thanks.
I'll incorporate your suggestions later today.

@woeps
Copy link
Contributor Author

woeps commented Aug 25, 2024

Sorry for the delay, I hope this is fine now.

Copy link
Owner

@rhysd rhysd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Thank you for catching this. Merging.

@rhysd rhysd merged commit 188da08 into rhysd:master Aug 28, 2024
9 checks passed
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.

function health#report_ok() does not exist
2 participants