build(IWYU): replace most private mappings with pragmas (#26247)

This commit is contained in:
zeertzjq 2023-11-27 20:58:37 +08:00 committed by GitHub
parent acf5252879
commit 38a20dd89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 67 additions and 214 deletions

View File

@ -262,7 +262,6 @@ iwyu: build/.ran-cmake
|src/nvim/os/fs.h\
|src/nvim/os/input.h\
|src/nvim/os/lang.h\
|src/nvim/os/os.h\
|src/nvim/os/pty_conpty_win.h\
|src/nvim/os/pty_process_unix.h\
|src/nvim/os/pty_process_win.h\

View File

@ -2,185 +2,16 @@
{ ref: "c99.imp" },
{ ref: "posix.imp" },
# Generated to normal headers: header.h.generated.h -> nvim/header.h
{ include: [ '"api/autocmd.h.generated.h"', private, '"nvim/api/autocmd.h"', public ] },
{ include: [ '"api/buffer.h.generated.h"', private, '"nvim/api/buffer.h"', public ] },
{ include: [ '"api/command.h.generated.h"', private, '"nvim/api/command.h"', public ] },
{ include: [ '"api/deprecated.h.generated.h"', private, '"nvim/api/deprecated.h"', public ] },
{ include: [ '"api/extmark.h.generated.h"', private, '"nvim/api/extmark.h"', public ] },
{ include: [ '"api/options.h.generated.h"', private, '"nvim/api/options.h"', public ] },
{ include: [ '"api/private/converter.h.generated.h"', private, '"nvim/api/private/converter.h"', public ] },
{ include: [ '"api/private/dispatch.h.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] },
{ include: [ '"api/private/helpers.h.generated.h"', private, '"nvim/api/private/helpers.h"', public ] },
{ include: [ '"api/private/validate.h.generated.h"', private, '"nvim/api/private/validate.h"', public ] },
{ include: [ '"api/tabpage.h.generated.h"', private, '"nvim/api/tabpage.h"', public ] },
{ include: [ '"api/ui.h.generated.h"', private, '"nvim/api/ui.h"', public ] },
{ include: [ '"api/vim.h.generated.h"', private, '"nvim/api/vim.h"', public ] },
{ include: [ '"api/vimscript.h.generated.h"', private, '"nvim/api/vimscript.h"', public ] },
{ include: [ '"api/win_config.h.generated.h"', private, '"nvim/api/win_config.h"', public ] },
{ include: [ '"api/window.h.generated.h"', private, '"nvim/api/window.h"', public ] },
{ include: [ '"arabic.h.generated.h"', private, '"nvim/arabic.h"', public ] },
{ include: [ '"arglist.h.generated.h"', private, '"nvim/arglist.h"', public ] },
{ include: [ '"autocmd.h.generated.h"', private, '"nvim/autocmd.h"', public ] },
{ include: [ '"base64.h.generated.h"', private, '"nvim/base64.h"', public ] },
{ include: [ '"buffer.h.generated.h"', private, '"nvim/buffer.h"', public ] },
{ include: [ '"buffer_updates.h.generated.h"', private, '"nvim/buffer_updates.h"', public ] },
{ include: [ '"bufwrite.h.generated.h"', private, '"nvim/bufwrite.h"', public ] },
{ include: [ '"change.h.generated.h"', private, '"nvim/change.h"', public ] },
{ include: [ '"channel.h.generated.h"', private, '"nvim/channel.h"', public ] },
{ include: [ '"charset.h.generated.h"', private, '"nvim/charset.h"', public ] },
{ include: [ '"cmdexpand.h.generated.h"', private, '"nvim/cmdexpand.h"', public ] },
{ include: [ '"cmdhist.h.generated.h"', private, '"nvim/cmdhist.h"', public ] },
{ include: [ '"context.h.generated.h"', private, '"nvim/context.h"', public ] },
{ include: [ '"cursor.h.generated.h"', private, '"nvim/cursor.h"', public ] },
{ include: [ '"cursor_shape.h.generated.h"', private, '"nvim/cursor_shape.h"', public ] },
{ include: [ '"debugger.h.generated.h"', private, '"nvim/debugger.h"', public ] },
{ include: [ '"decoration.h.generated.h"', private, '"nvim/decoration.h"', public ] },
{ include: [ '"decoration_provider.h.generated.h"', private, '"nvim/decoration_provider.h"', public ] },
{ include: [ '"diff.h.generated.h"', private, '"nvim/diff.h"', public ] },
{ include: [ '"digraph.h.generated.h"', private, '"nvim/digraph.h"', public ] },
{ include: [ '"drawline.h.generated.h"', private, '"nvim/drawline.h"', public ] },
{ include: [ '"drawscreen.h.generated.h"', private, '"nvim/drawscreen.h"', public ] },
{ include: [ '"edit.h.generated.h"', private, '"nvim/edit.h"', public ] },
{ include: [ '"eval.h.generated.h"', private, '"nvim/eval.h"', public ] },
{ include: [ '"eval/buffer.h.generated.h"', private, '"nvim/eval/buffer.h"', public ] },
{ include: [ '"eval/decode.h.generated.h"', private, '"nvim/eval/decode.h"', public ] },
{ include: [ '"eval/encode.h.generated.h"', private, '"nvim/eval/encode.h"', public ] },
{ include: [ '"eval/executor.h.generated.h"', private, '"nvim/eval/executor.h"', public ] },
{ include: [ '"eval/funcs.h.generated.h"', private, '"nvim/eval/funcs.h"', public ] },
{ include: [ '"eval/typval.h.generated.h"', private, '"nvim/eval/typval.h"', public ] },
{ include: [ '"eval/userfunc.h.generated.h"', private, '"nvim/eval/userfunc.h"', public ] },
{ include: [ '"eval/vars.h.generated.h"', private, '"nvim/eval/vars.h"', public ] },
{ include: [ '"eval/window.h.generated.h"', private, '"nvim/eval/window.h"', public ] },
{ include: [ '"event/libuv_process.h.generated.h"', private, '"nvim/event/libuv_process.h"', public ] },
{ include: [ '"event/loop.h.generated.h"', private, '"nvim/event/loop.h"', public ] },
{ include: [ '"event/multiqueue.h.generated.h"', private, '"nvim/event/multiqueue.h"', public ] },
{ include: [ '"event/process.h.generated.h"', private, '"nvim/event/process.h"', public ] },
{ include: [ '"event/rstream.h.generated.h"', private, '"nvim/event/rstream.h"', public ] },
{ include: [ '"event/signal.h.generated.h"', private, '"nvim/event/signal.h"', public ] },
{ include: [ '"event/socket.h.generated.h"', private, '"nvim/event/socket.h"', public ] },
{ include: [ '"event/stream.h.generated.h"', private, '"nvim/event/stream.h"', public ] },
{ include: [ '"event/time.h.generated.h"', private, '"nvim/event/time.h"', public ] },
{ include: [ '"event/wstream.h.generated.h"', private, '"nvim/event/wstream.h"', public ] },
{ include: [ '"ex_cmds.h.generated.h"', private, '"nvim/ex_cmds.h"', public ] },
{ include: [ '"ex_cmds2.h.generated.h"', private, '"nvim/ex_cmds2.h"', public ] },
{ include: [ '"ex_docmd.h.generated.h"', private, '"nvim/ex_docmd.h"', public ] },
{ include: [ '"ex_eval.h.generated.h"', private, '"nvim/ex_eval.h"', public ] },
{ include: [ '"ex_getln.h.generated.h"', private, '"nvim/ex_getln.h"', public ] },
{ include: [ '"ex_session.h.generated.h"', private, '"nvim/ex_session.h"', public ] },
{ include: [ '"extmark.h.generated.h"', private, '"nvim/extmark.h"', public ] },
{ include: [ '"file_search.h.generated.h"', private, '"nvim/file_search.h"', public ] },
{ include: [ '"fileio.h.generated.h"', private, '"nvim/fileio.h"', public ] },
{ include: [ '"fold.h.generated.h"', private, '"nvim/fold.h"', public ] },
{ include: [ '"garray.h.generated.h"', private, '"nvim/garray.h"', public ] },
{ include: [ '"getchar.h.generated.h"', private, '"nvim/getchar.h"', public ] },
{ include: [ '"grid.h.generated.h"', private, '"nvim/grid.h"', public ] },
{ include: [ '"hashtab.h.generated.h"', private, '"nvim/hashtab.h"', public ] },
{ include: [ '"help.h.generated.h"', private, '"nvim/help.h"', public ] },
{ include: [ '"highlight.h.generated.h"', private, '"nvim/highlight.h"', public ] },
{ include: [ '"highlight_group.h.generated.h"', private, '"nvim/highlight_group.h"', public ] },
{ include: [ '"if_cscope.h.generated.h"', private, '"nvim/if_cscope.h"', public ] },
{ include: [ '"indent.h.generated.h"', private, '"nvim/indent.h"', public ] },
{ include: [ '"indent_c.h.generated.h"', private, '"nvim/indent_c.h"', public ] },
{ include: [ '"input.h.generated.h"', private, '"nvim/input.h"', public ] },
{ include: [ '"insexpand.h.generated.h"', private, '"nvim/insexpand.h"', public ] },
{ include: [ '"keycodes.h.generated.h"', private, '"nvim/keycodes.h"', public ] },
{ include: [ '"linematch.h.generated.h"', private, '"nvim/linematch.h"', public ] },
{ include: [ '"locale.h.generated.h"', private, '"nvim/locale.h"', public ] },
{ include: [ '"log.h.generated.h"', private, '"nvim/log.h"', public ] },
{ include: [ '"lua/base64.h.generated.h"', private, '"nvim/lua/base64.h"', public ] },
{ include: [ '"lua/converter.h.generated.h"', private, '"nvim/lua/converter.h"', public ] },
{ include: [ '"lua/executor.h.generated.h"', private, '"nvim/lua/executor.h"', public ] },
{ include: [ '"lua/secure.h.generated.h"', private, '"nvim/lua/secure.h"', public ] },
{ include: [ '"lua/spell.h.generated.h"', private, '"nvim/lua/spell.h"', public ] },
{ include: [ '"lua/stdlib.h.generated.h"', private, '"nvim/lua/stdlib.h"', public ] },
{ include: [ '"lua/treesitter.h.generated.h"', private, '"nvim/lua/treesitter.h"', public ] },
{ include: [ '"lua/xdiff.h.generated.h"', private, '"nvim/lua/xdiff.h"', public ] },
{ include: [ '"main.h.generated.h"', private, '"nvim/main.h"', public ] },
{ include: [ '"mapping.h.generated.h"', private, '"nvim/mapping.h"', public ] },
{ include: [ '"mark.h.generated.h"', private, '"nvim/mark.h"', public ] },
{ include: [ '"marktree.h.generated.h"', private, '"nvim/marktree.h"', public ] },
{ include: [ '"match.h.generated.h"', private, '"nvim/match.h"', public ] },
{ include: [ '"math.h.generated.h"', private, '"nvim/math.h"', public ] },
{ include: [ '"mbyte.h.generated.h"', private, '"nvim/mbyte.h"', public ] },
{ include: [ '"memfile.h.generated.h"', private, '"nvim/memfile.h"', public ] },
{ include: [ '"memline.h.generated.h"', private, '"nvim/memline.h"', public ] },
{ include: [ '"memory.h.generated.h"', private, '"nvim/memory.h"', public ] },
{ include: [ '"menu.h.generated.h"', private, '"nvim/menu.h"', public ] },
{ include: [ '"message.h.generated.h"', private, '"nvim/message.h"', public ] },
{ include: [ '"mouse.h.generated.h"', private, '"nvim/mouse.h"', public ] },
{ include: [ '"move.h.generated.h"', private, '"nvim/move.h"', public ] },
{ include: [ '"msgpack_rpc/channel.h.generated.h"', private, '"nvim/msgpack_rpc/channel.h"', public ] },
{ include: [ '"msgpack_rpc/helpers.h.generated.h"', private, '"nvim/msgpack_rpc/helpers.h"', public ] },
{ include: [ '"msgpack_rpc/server.h.generated.h"', private, '"nvim/msgpack_rpc/server.h"', public ] },
{ include: [ '"msgpack_rpc/unpacker.h.generated.h"', private, '"nvim/msgpack_rpc/unpacker.h"', public ] },
{ include: [ '"normal.h.generated.h"', private, '"nvim/normal.h"', public ] },
{ include: [ '"ops.h.generated.h"', private, '"nvim/ops.h"', public ] },
{ include: [ '"option.h.generated.h"', private, '"nvim/option.h"', public ] },
{ include: [ '"optionstr.h.generated.h"', private, '"nvim/optionstr.h"', public ] },
{ include: [ '"os/dl.h.generated.h"', private, '"nvim/os/dl.h"', public ] },
{ include: [ '"os/fileio.h.generated.h"', private, '"nvim/os/fileio.h"', public ] },
{ include: [ '"os/fs.h.generated.h"', private, '"nvim/os/fs.h"', public ] },
{ include: [ '"os/input.h.generated.h"', private, '"nvim/os/input.h"', public ] },
{ include: [ '"os/lang.h.generated.h"', private, '"nvim/os/lang.h"', public ] },
{ include: [ '"os/process.h.generated.h"', private, '"nvim/os/process.h"', public ] },
{ include: [ '"os/pty_process_unix.h.generated.h"', private, '"nvim/os/pty_process_unix.h"', private ] },
{ include: [ '"os/shell.h.generated.h"', private, '"nvim/os/shell.h"', public ] },
{ include: [ '"os/signal.h.generated.h"', private, '"nvim/os/signal.h"', public ] },
{ include: [ '"os/time.h.generated.h"', private, '"nvim/os/time.h"', public ] },
{ include: [ '"path.h.generated.h"', private, '"nvim/path.h"', public ] },
{ include: [ '"plines.h.generated.h"', private, '"nvim/plines.h"', public ] },
{ include: [ '"popupmenu.h.generated.h"', private, '"nvim/popupmenu.h"', public ] },
{ include: [ '"profile.h.generated.h"', private, '"nvim/profile.h"', public ] },
{ include: [ '"quickfix.h.generated.h"', private, '"nvim/quickfix.h"', public ] },
{ include: [ '"rbuffer.h.generated.h"', private, '"nvim/rbuffer.h"', public ] },
{ include: [ '"regexp.h.generated.h"', private, '"nvim/regexp.h"', public ] },
{ include: [ '"runtime.h.generated.h"', private, '"nvim/runtime.h"', public ] },
{ include: [ '"screen.h.generated.h"', private, '"nvim/screen.h"', public ] },
{ include: [ '"search.h.generated.h"', private, '"nvim/search.h"', public ] },
{ include: [ '"sha256.h.generated.h"', private, '"nvim/sha256.h"', public ] },
{ include: [ '"shada.h.generated.h"', private, '"nvim/shada.h"', public ] },
{ include: [ '"sign.h.generated.h"', private, '"nvim/sign.h"', public ] },
{ include: [ '"spell.h.generated.h"', private, '"nvim/spell.h"', public ] },
{ include: [ '"spellfile.h.generated.h"', private, '"nvim/spellfile.h"', public ] },
{ include: [ '"spellsuggest.h.generated.h"', private, '"nvim/spellsuggest.h"', public ] },
{ include: [ '"state.h.generated.h"', private, '"nvim/state.h"', public ] },
{ include: [ '"statusline.h.generated.h"', private, '"nvim/statusline.h"', public ] },
{ include: [ '"strings.h.generated.h"', private, '"nvim/strings.h"', public ] },
{ include: [ '"syntax.h.generated.h"', private, '"nvim/syntax.h"', public ] },
{ include: [ '"tag.h.generated.h"', private, '"nvim/tag.h"', public ] },
{ include: [ '"terminal.h.generated.h"', private, '"nvim/terminal.h"', public ] },
{ include: [ '"testing.h.generated.h"', private, '"nvim/testing.h"', public ] },
{ include: [ '"textformat.h.generated.h"', private, '"nvim/textformat.h"', public ] },
{ include: [ '"textobject.h.generated.h"', private, '"nvim/textobject.h"', public ] },
{ include: [ '"tui/input.h.generated.h"', private, '"nvim/tui/input.h"', public ] },
{ include: [ '"tui/terminfo.h.generated.h"', private, '"nvim/tui/terminfo.h"', public ] },
{ include: [ '"tui/tui.h.generated.h"', private, '"nvim/tui/tui.h"', public ] },
{ include: [ '"ugrid.h.generated.h"', private, '"nvim/ugrid.h"', public ] },
{ include: [ '"ui.h.generated.h"', private, '"nvim/ui.h"', public ] },
{ include: [ '"ui_bridge.h.generated.h"', private, '"nvim/ui_bridge.h"', public ] },
{ include: [ '"ui_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] },
{ include: [ '"ui_compositor.h.generated.h"', private, '"nvim/ui_compositor.h"', public ] },
{ include: [ '"undo.h.generated.h"', private, '"nvim/undo.h"', public ] },
{ include: [ '"usercmd.h.generated.h"', private, '"nvim/usercmd.h"', public ] },
{ include: [ '"version.h.generated.h"', private, '"nvim/version.h"', public ] },
{ include: [ '"viml/parser/expressions.h.generated.h"', private, '"nvim/viml/parser/expressions.h"', public ] },
{ include: [ '"viml/parser/parser.h.generated.h"', private, '"nvim/viml/parser/parser.h"', public ] },
{ include: [ '"window.h.generated.h"', private, '"nvim/window.h"', public ] },
{ include: [ '"winfloat.h.generated.h"', private, '"nvim/winfloat.h"', public ] },
# Generated to normal headers with a different name: header.h.generated.h -> nvim/some_other_header.h
{ include: [ '"api/private/dispatch_wrappers.h.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] },
{ include: [ '"keysets.h.generated.h"', private, '"nvim/api/private/helpers.h"', public ] },
{ include: [ '"keysets_defs.generated.h"', private, '"nvim/api/private/defs.h"', public ] },
{ include: [ '"os/env.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/fs.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/mem.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/stdpaths.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/users.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"ui_events_call.h.generated.h"', private, '"nvim/ui.h"', public ] },
{ include: [ '"ui_events_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] },
{ include: [ '"ui_events_remote.generated.h"', private, '"nvim/api/ui.h"', public ] },
{ include: [ '"ui_events_remote.h.generated.h"', private, '"nvim/api/ui.h"', public ] },
# Symbols

View File

@ -1017,7 +1017,6 @@ def CheckIncludes(filename, lines, error):
"src/nvim/os/fs.h",
"src/nvim/os/input.h",
"src/nvim/os/lang.h",
"src/nvim/os/os.h",
"src/nvim/os/pty_conpty_win.h",
"src/nvim/os/pty_process_unix.h",
"src/nvim/os/pty_process_win.h",

View File

@ -1,10 +1,10 @@
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
#include <msgpack/unpack.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -17,6 +17,7 @@
#include "nvim/ascii.h"
#include "nvim/buffer_defs.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
#include "nvim/eval/vars.h"
#include "nvim/ex_eval.h"
#include "nvim/garray.h"

View File

@ -78,7 +78,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"

View File

@ -35,7 +35,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -46,6 +46,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/lang.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -46,7 +46,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/os/shell.h"
#include "nvim/path.h"

View File

@ -60,7 +60,7 @@
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fileio.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/lang.h"
#include "nvim/os/os.h"
#include "nvim/os/shell.h"

View File

@ -90,7 +90,7 @@
#include "nvim/optionstr.h"
#include "nvim/os/dl.h"
#include "nvim/os/fileio.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/os/pty_process.h"
#include "nvim/os/shell.h"

View File

@ -11,7 +11,7 @@
#include "nvim/mark.h"
#include "nvim/option_defs.h"
#include "nvim/option_vars.h"
#include "nvim/os/os.h"
#include "nvim/os/fs.h"
#include "nvim/pos.h"
#include "nvim/vim.h"
#include "nvim/window.h"

View File

@ -14,6 +14,7 @@
#include "nvim/log.h"
#include "nvim/main.h"
#include "nvim/memory.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -65,7 +65,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/shell.h"

View File

@ -61,6 +61,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/shell.h"

View File

@ -29,6 +29,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/path.h"
#include "nvim/pos.h"

View File

@ -62,7 +62,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -48,6 +48,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"

View File

@ -1,12 +1,16 @@
#pragma once
#include "nvim/buffer_defs.h"
#include <stdint.h> // IWYU pragma: keep
#include <stdio.h> // IWYU pragma: keep
#include <time.h> // IWYU pragma: keep
#include "nvim/buffer_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h"
#include "nvim/ex_cmds_defs.h"
#include "nvim/garray_defs.h"
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim/globals.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/os.h"
#include "nvim/os/fs_defs.h" // IWYU pragma: keep
#include "nvim/pos.h"
// Values for readfile() flags
#define READ_NEW 0x01 // read a file into a new buffer

View File

@ -171,7 +171,7 @@ static functions into static.h and declarations for non-static functions into
non-static.h. File `definitions.i' should contain an already preprocessed
version of definitions.c and it is the only one which is actually parsed,
definitions.c is needed only to determine functions from which file out of all
functions found in definitions.i are needed.
functions found in definitions.i are needed and to generate an IWYU comment.
Additionally uses the following environment variables:
@ -224,6 +224,18 @@ local non_static = header .. [[
local static = header
if fname:find('.*/src/nvim/.*%.c$') then
-- Add an IWYU pragma comment if the corresponding .h file exists.
local header_fname = fname:sub(1, -3) .. '.h'
local header_f = io.open(header_fname, 'r')
if header_f ~= nil then
header_f:close()
non_static = ([[
// IWYU pragma: private, include "%s"
]]):format(header_fname:gsub('.*/src/nvim/', 'nvim/')) .. non_static
end
end
local filepattern = '^#%a* (%d+) "([^"]-)/?([^"/]+)"'
local init = 1
@ -241,12 +253,7 @@ while init ~= nil do
curfile = file
is_needed_file = (curfile == neededfile)
declline = tonumber(line) - 1
local curdir_start = dir:find('src/nvim/')
if curdir_start ~= nil then
curdir = dir:sub(curdir_start + #('src/nvim/'))
else
curdir = dir
end
curdir = dir:gsub('.*/src/nvim/', '')
else
declline = declline - 1
end
@ -308,7 +315,7 @@ F = io.open(static_fname, 'w')
F:write(static)
F:close()
-- Before generating the non-static headers, check if the current file(if
-- Before generating the non-static headers, check if the current file (if
-- exists) is different from the new one. If they are the same, we won't touch
-- the current version to avoid triggering an unnecessary rebuilds of modules
-- that depend on this one

View File

@ -29,6 +29,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -23,6 +23,7 @@
#include "nvim/log.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/os/stdpaths_defs.h"
#include "nvim/os/time.h"

View File

@ -67,6 +67,7 @@
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fileio.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/lang.h"
#include "nvim/os/os.h"

View File

@ -29,6 +29,7 @@
#include "nvim/move.h"
#include "nvim/normal.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -55,7 +55,7 @@
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -41,6 +41,7 @@
#include "nvim/ops.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"

View File

@ -22,6 +22,7 @@
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/path.h"
#include "nvim/strings.h"

View File

@ -19,7 +19,7 @@
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/os/fileio.h"
#include "nvim/os/os.h"
#include "nvim/os/fs.h"
#include "nvim/os/os_defs.h"
#include "nvim/rbuffer.h"
#include "nvim/types.h"

View File

@ -17,6 +17,7 @@
#endif
#include "auto/config.h"
#include "nvim/os/fs.h"
#if defined(HAVE_ACL)
# ifdef HAVE_SYS_ACL_H
@ -39,7 +40,6 @@
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/os.h"
#include "nvim/path.h"
#include "nvim/types.h"

View File

@ -1,19 +1,17 @@
#pragma once
#include <stdbool.h>
#include <uv.h>
#include <stddef.h> // IWYU pragma: keep
#include <stdint.h> // IWYU pragma: keep
#include <uv.h> // IWYU pragma: keep
#include "nvim/buffer_defs.h"
#include "nvim/cmdexpand_defs.h"
#include "nvim/garray_defs.h"
#include "nvim/os/fs_defs.h"
#include "nvim/buffer_defs.h" // IWYU pragma: keep
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim/os/os_defs.h" // IWYU pragma: export
#include "nvim/os/stdpaths_defs.h"
#include "nvim/types.h"
#include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "os/env.h.generated.h"
# include "os/fs.h.generated.h"
# include "os/mem.h.generated.h"
# include "os/stdpaths.h.generated.h"
# include "os/users.h.generated.h"

View File

@ -1,3 +1,4 @@
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/os_win_console.h"

View File

@ -36,7 +36,7 @@
#include "nvim/event/process.h"
#include "nvim/event/stream.h"
#include "nvim/log.h"
#include "nvim/os/os.h"
#include "nvim/os/fs.h"
#include "nvim/os/os_defs.h"
#include "nvim/os/pty_process.h"
#include "nvim/os/pty_process_unix.h"

View File

@ -25,7 +25,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/shell.h"

View File

@ -22,6 +22,7 @@
#include "nvim/keycodes.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
#include "nvim/pos.h"

View File

@ -47,7 +47,7 @@
#include "nvim/option_defs.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/path.h"

View File

@ -40,6 +40,7 @@
#include "nvim/option.h"
#include "nvim/option_defs.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/stdpaths_defs.h"

View File

@ -41,7 +41,7 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fileio.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
#include "nvim/path.h"

View File

@ -252,6 +252,7 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"

View File

@ -41,8 +41,8 @@
#include "nvim/option_defs.h"
#include "nvim/option_vars.h"
#include "nvim/optionstr.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/os_defs.h"
#include "nvim/os/time.h"
#include "nvim/path.h"

View File

@ -20,7 +20,7 @@
#include "nvim/mbyte.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/os/os.h"
#include "nvim/os/fs.h"
#include "nvim/runtime.h"
#include "nvim/strings.h"
#include "nvim/testing.h"

View File

@ -110,9 +110,8 @@
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/os/fs_defs.h"
#include "nvim/os/fs.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/os_defs.h"
#include "nvim/os/time.h"
#include "nvim/path.h"

View File

@ -55,7 +55,7 @@
#include "nvim/option.h"
#include "nvim/option_defs.h"
#include "nvim/option_vars.h"
#include "nvim/os/os.h"
#include "nvim/os/fs.h"
#include "nvim/os/os_defs.h"
#include "nvim/path.h"
#include "nvim/plines.h"