1. Vim9 error messages, ex commands, are N/A.
2. ":scriptversion" is N/A:
3. Most `#.*define.*ex_ni$` are N/A
because `FEAT_` compile guards are N/A.
----
Target patch: v8.2.2238
Actual patch list:
```
vim-patch:8.2.4240: error for using flatten() in Vim9 script is unclear
vim-patch:9.0.0170: various minor code formatting issues
vim-patch:9.1.0356: MS-Windows: --remote may change working directory
vim-patch:9.2.0251: Link error when building without channel feature
vim-patch:9.2.0714: Coverity warns for NULL deref
vim-patch:9.2.0818: tests: client-server test fails without X11 server
vim-patch:9.2.0868: GTK: Window Manager hint prevents giving focus to dialog
```
----
Ignore diff blanklines via regex ("-I"), not "--ignore-blank-lines".
Almost useless.
I tried with/without "--word-diff=porcelain", "--word-diff-regex",
and diff algorithms like `--histogram`.
Nvim diverged from Vim's ":version".
- no date
- different compiled features list
- different config file and directory
- no compiler flags
* build(vim-patch): n/a doc for balloon feature (8.2.3917)
Vim patches for Vim help files must use Vim tags as diff hunk header
to reliably detect if a hunk is N/A or not.
Git does not know which files are Vim help files
so that it can use custom "diff.<filetype>.xfuncname" regexp
to create the header.
Update Neovim's gitattributes to detect Vim help files
and then use it on vim-patch.sh to scan Vim patches.
Add non-function tags from ":h vim_diff"
to detect N/A Vim runtime patches.
Problem: scripts/genappimage.sh runs `make` with no extra flags and
emits a fixed nvim-linux-<arch>.appimage filename, so packaging a
variant build (e.g. with the bundled PUC-Rio Lua interpreter)
requires editing the Makefile or post-renaming the AppImage, which
breaks the AppImage zsync URL.
Solution: forward DEPS_CMAKE_FLAGS and CMAKE_EXTRA_FLAGS to `make`,
accept OUTPUT so the AppImage (and its zsync Filename:) follows the
caller's chosen name, and mark CPACK_PACKAGE_FILE_NAME as CACHE
STRING on Linux so the resulting tarball/deb follow as well. Default
behavior is unchanged when none of these env vars are set.
"vim-patch.sh -L" includes gpg signature for "log.showSignature=true"
in user's .gitconfig.
vim-patch.sh expects no signature for 1-line output per patch.
Problem:
Options parsing is still painful for dict-style options.
Solution:
schema-maxxing => better `opt:get()` (will be the basis for `vim.o()`),
unified (and more-detailed) err msgs.
- Drop bespoke structure-builder in `_core/options.lua`.
- Define `schema` for all non-primitive options (except 'guicursor' and
statusline-style options); generate reified keysets `OptKeyDict`).
- Generate 'fillchars' => `fcs_tab`, 'listchars' => `lcs_tab`.
- `nvim_set_option_value`:
- Return the improved structures. Also from `vim.opt.x:get()`.
- Eliminate api <=> lua roundtrip, centralize option structure
handling.
- Improve/unify errors.
- Bump ERR_BUFLEN 80 → 256 so the "one of" list isn't truncated.
- Eliminate old 'diffopt' order-dependence (`iwhiteall` before `iwhite`)
Error samples:
Typed-key path (opt_strings_check → diffopt/mousescroll/breakindentopt):
E474: Unknown item 'foo'
E474: 'context' requires a number
E474: 'ver' number is out of range
E474: 'algorithm' must be one of: myers, minimal, patience, histogram
E474: 'filler' does not take a value
Related:
- #31084
- #34661
- #31820
- #14739
- #20107
- fix#18875
- :get() returns `{ sbr = true, shift = '3' }` (reified-keyset) instead of `{'sbr', 'shift:3'}`
- Setting via table now works too. `object_as_optval_for` `is_map` now recognizes struct options.
- fix#30296
- instead of `E474: Invalid argument`, errors now look like:
```
E474: Invalid value 'x', expected one of: single, double: ambiwidth=x
E474: Unknown item 'foo': diffopt=foo
E474: 'context' requires a number: diffopt=context:x
```
simplify `win_float_parse_option` from #26799.
Vim's code and test for channel,job API are already N/A.
Blacklisting runtime/doc/channel.txt ensures most patches for it
will be detected as N/A.
Vim's API that is too incompatible with Neovim must be handled
outside vim-patch.sh .
Problem: ml_get error when changing hidden buffer in Python.
Solution: Block updating folds. (closesvim/vim#7598)
----
"ctx_switch()", "ctx_restore()" obsolete "switch_buffer()" and
"restore_buffer()".
Latter are unused since https://github.com/neovim/neovim/pull/15831.
Mark them as N/A (until some test fails).
----
3e0107ea16
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: has() assumes a feature does not change dynamically.
Solution: Check whether a feature may change dynamically. (closesvim/vim#7265)
----
"dynamic_feature()" is only for vim9script which is N/A.
----
8cebd43e97
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
Neovim refactored Vim's "char/string" functions to be either safer
(ie. xstrlcat) or target Unicode.
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
I use the 'vim_na_*' files to debug the filtered diff of files
that seem N/A but contain relevant code.
I can't blacklist the entire file.
Filter out `#ifdef` line changes when analyzing C files (*.c, *.h)
via git "-I" flag.
```
-I<regex>
--ignore-matching-lines=<regex>
Ignore changes whose all lines match <regex>. This option may be specified more than once.
```
- https://git-scm.com/docs/diff-options#Documentation/diff-options.txt--Iregex
Following features must be N/A to detect v8.Y.0000 as N/A
- VisVim
- Windows *.def files
- Gvim
- runtime/doc/version8.txt ("too old")
(https://github.com/neovim/neovim/pull/1116 deletes version7.txt)
PR https://github.com/neovim/neovim/pull/36585 enabled
"scripts/vim-patch.sh", "scripts/vimpatch.lua" to optimize out
(all?) macros from Vim's "src/version.h".
If it does have relevant updates, then the applicable files
(ie. src/version.c) will use them to make the patch applicable.
Goal - Detect N/A patches for Vim release vX.Y.0000.
Problem:
- `edit.c` is an unnecessarily misleading and less-discoverable name
than `insert.c`.
- Numerous insert-mode related things are named with a `ins_` prefix.
- There is already a `insexpand.c` module...
Solution:
Rename `edit.c` => `insert.c`.
Problem:
`getchar.c` is a quirky name and doesn't align with our existing
`os/input.c` and `tui/input.c` modules, which encompass the same topic
at different layers.
Solution:
Rename `getchar.c` => `input.c` for discoverability.
Introduce `dialog.c` for functionality related to showing confirm
prompts, dialogs, etc.
Nvim relies on commit history for automated updates
to ported Vim patches across Vim releases via "included_patchsets[]".
Each Vim commit is suppose to manually adjust "included_patches[]"
but it is prone to human error such that vim-patch.sh found
the following N/A commits:
```
495282b6e Correct list of patch numbers
85d9b03f8 Correct list of patches.
```
Prior to this commit, vim-patch doesn't find the following N/A commit:
```
9.0.2172: Vim9: compiling :defer may fail
```
https://github.com/neovim/neovim/pull/40519#issuecomment-4850337525
vim_na_cfuncs.txt lists Vim C functions that are N/A to Nvim.
Listed in 'src/proto/*.proto' files.
Based on ':h vim-diff'.
- features (ie. balloon, tabpanel)
- Ex-commands
- eval functions (ie. f_err_teapot())
On top of the existing algorithm,
scan diff hunks on C files to filter out N/A C functions.
If the remaining hunk contains applicable changes,
then the patch is applicable.
If the patch does not modify C files, then it is likely applicable.
socketserver.c is not compatible with Neovim's server implementation.
cairo, kitty, sixel, and similar backends for image rendering in popup
are not required in Neovim's C core.
Neovim can do this and even run Doom.
See patch 9.2.0612.
Problem:
Backport commits may have subjects like "backport: fix(ui): ...".
(e.g. ecda67662f). git-cliff treats them as OTHER.
Solution:
Preprocess the subject to strip a leading "backport:" or "backport ".
Problem: There is no way to do something on CTRL-Z.
Solution: Add VimSuspend and VimResume autocommand events. (closesvim/vim#7450)
100118c73a
----
Nvim implemented these events first and has enough tests.
test_suspend.vim relies on Vim 'terminal' feature.
Treat it as N/A even if all tests could be ported as Lua functional
screen/terminal tests.
----
Co-authored-by: Bram Moolenaar <Bram@vim.org>
* build(vim-patch): test_clientserver.vim is N/A
Requires 'job' and 'clientserver' features.
Both N/A for Neovim.
* build(vim-patch): test_gui_init.vim is N/A
Starts with command 'CheckCanRuiGui' .
Nvim doesn't support ':gui' (yet).
* build(vim-patch): test_plugin_vimball.vim is N/A
Run ':h vimball'.
* build(vim-patch): test_remote.vim is N/A
Needs 'clientserver', 'terminal' features.
* build(vim-patch): test_short_sleep.py is for test_terminal.vim. Both N/A
* build(vim-patch): mark N/A files from test_crypt.vim
* build(vim-patch): mark N/A file for test_terminal3.vim
* build(vim-patch): mark N/A files channel/terminal/vim9 tests
Although `nlua_call_excmd` is semantically for implementing Ex-commands,
the `require()` should never fail, so that's a "Lua error".
But if the call itself fails (the later `semsg` call), that's an "Ex
cmd" error.
Problem:
Too much boilerplate needed to use Lua to impl an excmd or f_xx
function.
Solution:
- Add `nlua_call_vimfn` which takes the args typval, executes
Lua, and returns a typval.
- refactor(excmd): lua impl for :log, :lsp
Problem:
- Choosing a new EXX error code is tedious.
- It's possible to accidentally use an EXX error code for different
purposes.
Solution:
Add a lint check which requires EXX error codes to have a :help tag.
This also avoids duplicates because `make doc` does `:helptags ++t doc`
which fails if duplicates are found.
Problem:
Naming conventions are not automatically checked.
Solution:
Add a check to the doc generator. Eventually we should extract this
somehow, but that will require refactoring the doc generator...
Note: this also checks non-public functions, basically anything that
passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's
a good thing.
Problem: Assuming modifyOtherKeys for rhs of mapping.
Solution: Ignore seenModifyOtherKeys for mapped characters. (closesvim/vim#6200)
46cd43bda1
----
"getchar.c" changes depend on patch 8.1.2145.
Can't port it due to tests.
"test_gui.vim" doesn't depend on GUI for all tests.
----
Co-authored-by: Bram Moolenaar <Bram@vim.org>