neovim/runtime
Justin M. Keyes 9e23b4e185 fix(watch): ignore nonexistent paths (ENOENT)
Problem:
The `_watch.watch()` strategy may fail if the given path does not exist:

    …/vim/_watch.lua:101: ENOENT: no such file or directory
    stack traceback:
        [C]: in function 'assert'
        …/vim/_watch.lua:101: in function <…/vim/_watch.lua:61>
        [string "<nvim>"]:5: in main chunk

- `_watch.watch()` actively asserts any error returned by `handle:start()`.
- whereas `_watch.watchdirs()` just ignores the result of `root_handle:start()`.

Servers may send "client/registerCapability" with "workspace/didChangeWatchedFiles"
item(s) (`baseUri`) which do not actually exist on the filesystem:
https://github.com/neovim/neovim/issues/28058#issuecomment-2189929424

    {
      method = "client/registerCapability",
      params = {
        registrations = { {
            method = "workspace/didChangeWatchedFiles",
            registerOptions = {
              watchers = { {
                  globPattern = {
                    baseUri = "file:///Users/does/not/exist",
                    pattern = "**/*.{ts,js,mts,mjs,cjs,cts,json,svelte}"
                  }
                },
    ...
    }

Solution:
- Remove the assert in `_watch.watch()`.
- Show a once-only message for both cases.
- More detailed logging is blocked until we have `nvim_log` / `vim.log`.

fix #28058
2024-10-02 16:41:01 +02:00
..
autoload vim-patch:85f054a: runtime(java): Recognise the CommonMark form (///) of Javadoc comments 2024-10-01 07:33:24 +02:00
colors vim-patch:6908db4: runtime(colors): update colorschemes 2024-08-17 13:03:13 +02:00
compiler vim-patch:077d1d2: runtime(make): add compiler/make.vim to reset compiler plugin settings 2024-09-11 09:47:30 +02:00
doc vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616) 2024-10-01 23:39:28 +00:00
ftplugin vim-patch:85f054a: runtime(java): Recognise the CommonMark form (///) of Javadoc comments 2024-10-01 07:33:24 +02:00
indent vim-patch:150b507: runtime(hcl,terraform): Add runtime files for HCL and Terraform (#30266) 2024-09-04 19:32:52 -05:00
keymap vim-patch:79a14c0: runtime(keymap): include Georgian keymap 2024-06-14 23:58:27 +02:00
lua fix(watch): ignore nonexistent paths (ENOENT) 2024-10-02 16:41:01 +02:00
macros
pack/dist/opt vim-patch:5753d99: runtime(nohlsearch): add missing loaded_hlsearch guard 2024-07-31 23:06:28 +02:00
plugin vim-patch:9.1.0694: matchparen is slow on a long line (#30134) 2024-08-25 06:07:43 +08:00
queries feat(defaults): pretty :help headings #30544 2024-09-27 08:53:30 -07:00
spell
syntax vim-patch:85f054a: runtime(java): Recognise the CommonMark form (///) of Javadoc comments 2024-10-01 07:33:24 +02:00
tools
tutor fix(tutor): incorrect lines marked as correct #29833 2024-08-16 10:35:13 -07:00
CMakeLists.txt
delmenu.vim
filetype.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim
menu.vim
mswin.vim
neovim.ico
nvim.appdata.xml
nvim.desktop docs: misc (#29719) 2024-08-29 06:11:32 +08:00
nvim.png
optwin.vim vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682) 2024-07-13 08:56:58 +08:00
synmenu.vim
windows_icon.rc feat(win32): embed executable icon 2024-07-02 13:05:16 +02:00