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

fix: change deprecation presentation #28778

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

dundargoc
Copy link
Member

@dundargoc dundargoc commented May 16, 2024

Deprecation with vim.deprecate is currently too noisy. Show the
following warning instead:

[function] is deprecated. Run ":checkhealth vim.deprecated" for more information.

The important part is that the full message needs to be short enough to
fit in one line in order to not trigger the "Press ENTER or type command
to continue" prompt.

The full information and stack trace for the deprecated functions will
be shown in the new healthcheck vim.deprecated.

@dundargoc dundargoc changed the title fix: change deprecation presentation fix: change deprecation presentation [skip ci] May 16, 2024
@clason
Copy link
Member

clason commented May 17, 2024

The message can still contain specifics (like the name of the function, and possibly the file?) -- the important thing is that it is guaranteed to be a single line so it doesn't trigger the dreaded "press enter" prompt. In particular, the full stack trace should be punted to the health check (as you propose).

@justinmk
Copy link
Member

justinmk commented May 17, 2024

the important thing is that it is guaranteed to be a single line so it doesn't trigger the dreaded "press enter"

To be clear: it can occupy vim.o.columns * math.max(vim.o.cmdheight - 1, 0) + vim.v.echospace , which may be more than one line. Main goal is to avoid hit-enter prompt. strcharpart() may be useful.

@dundargoc dundargoc force-pushed the fix/deprecate branch 10 times, most recently from e1212d5 to a5c19ea Compare May 19, 2024 11:58
@dundargoc dundargoc force-pushed the fix/deprecate branch 10 times, most recently from 8617b53 to 101acb9 Compare May 19, 2024 14:54
@dundargoc dundargoc changed the title fix: change deprecation presentation [skip ci] fix: change deprecation presentation May 19, 2024
@dundargoc dundargoc marked this pull request as ready for review May 19, 2024 14:54
@dundargoc dundargoc requested review from a team and mfussenegger and removed request for a team May 19, 2024 14:55
Deprecation with vim.deprecate is currently too noisy. Show the
following warning instead:

[function] is deprecated. Run ":checkhealth vim.deprecated" for more information.

The important part is that the full message needs to be short enough to
fit in one line in order to not trigger the "Press ENTER or type command
to continue" prompt.

The full information and stack trace for the deprecated functions will
be shown in the new healthcheck `vim.deprecated`.
@dundargoc dundargoc modified the milestones: 0.11, 0.10.1 May 23, 2024
@dundargoc dundargoc merged commit d123202 into neovim:master May 24, 2024
29 checks passed
@dundargoc dundargoc deleted the fix/deprecate branch May 24, 2024 09:08
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.

None yet

7 participants