Skip to content

Commit

Permalink
refactor: fix runtime_defs.h (neovim#26259)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeertzjq authored Nov 27, 2023
1 parent 6c14ae6 commit 718053b
Show file tree
Hide file tree
Showing 59 changed files with 299 additions and 335 deletions.
40 changes: 0 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,49 +142,32 @@ iwyu: build/.ran-cmake
cmake --preset iwyu
cmake --build build > build/iwyu.log
iwyu-fix-includes --only_re="src/nvim" --ignore_re="(src/nvim/eval/encode.c|src/nvim/auto/|src/nvim/os/lang.c|src/nvim/map.c\
|src/nvim/api/buffer.h\
|src/nvim/api/command.h\
|src/nvim/api/extmark.h\
|src/nvim/api/options.h\
|src/nvim/api/private/defs.h\
|src/nvim/api/private/dispatch.h\
|src/nvim/api/private/helpers.h\
|src/nvim/api/private/validate.h\
|src/nvim/api/ui.h\
|src/nvim/api/vim.h\
|src/nvim/api/vimscript.h\
|src/nvim/api/win_config.h\
|src/nvim/api/window.h\
|src/nvim/arglist.h\
|src/nvim/ascii.h\
|src/nvim/assert.h\
|src/nvim/autocmd.h\
|src/nvim/autocmd_defs.h\
|src/nvim/buffer.h\
|src/nvim/buffer_defs.h\
|src/nvim/buffer_updates.h\
|src/nvim/bufwrite.h\
|src/nvim/change.h\
|src/nvim/channel.h\
|src/nvim/charset.h\
|src/nvim/cmdexpand.h\
|src/nvim/cmdexpand_defs.h\
|src/nvim/cmdhist.h\
|src/nvim/context.h\
|src/nvim/cursor.h\
|src/nvim/decoration.h\
|src/nvim/decoration_defs.h\
|src/nvim/decoration_provider.h\
|src/nvim/diff.h\
|src/nvim/digraph.h\
|src/nvim/drawline.h\
|src/nvim/drawscreen.h\
|src/nvim/edit.h\
|src/nvim/eval.h\
|src/nvim/eval/buffer.h\
|src/nvim/eval/decode.h\
|src/nvim/eval/encode.h\
|src/nvim/eval/funcs.h\
|src/nvim/eval/typval.h\
|src/nvim/eval/typval_defs.h\
|src/nvim/eval/typval_encode.h\
Expand All @@ -204,46 +187,34 @@ iwyu: build/.ran-cmake
|src/nvim/ex_cmds.h\
|src/nvim/ex_cmds_defs.h\
|src/nvim/ex_docmd.h\
|src/nvim/ex_eval_defs.h\
|src/nvim/ex_getln.h\
|src/nvim/extmark.h\
|src/nvim/extmark_defs.h\
|src/nvim/file_search.h\
|src/nvim/fileio.h\
|src/nvim/fold.h\
|src/nvim/fold_defs.h\
|src/nvim/garray.h\
|src/nvim/getchar.h\
|src/nvim/globals.h\
|src/nvim/grid.h\
|src/nvim/grid_defs.h\
|src/nvim/hashtab.h\
|src/nvim/highlight.h\
|src/nvim/highlight_defs.h\
|src/nvim/highlight_group.h\
|src/nvim/indent.h\
|src/nvim/indent_c.h\
|src/nvim/input.h\
|src/nvim/insexpand.h\
|src/nvim/keycodes.h\
|src/nvim/linematch.h\
|src/nvim/log.h\
|src/nvim/lua/executor.h\
|src/nvim/macros.h\
|src/nvim/main.h\
|src/nvim/map.h\
|src/nvim/mapping.h\
|src/nvim/mapping_defs.h\
|src/nvim/mark.h\
|src/nvim/mark_defs.h\
|src/nvim/marktree.h\
|src/nvim/match.h\
|src/nvim/mbyte.h\
|src/nvim/mbyte_defs.h\
|src/nvim/memfile_defs.h\
|src/nvim/memline.h\
|src/nvim/memory.h\
|src/nvim/menu.h\
|src/nvim/message.h\
|src/nvim/mouse.h\
|src/nvim/move.h\
Expand All @@ -254,31 +225,22 @@ iwyu: build/.ran-cmake
|src/nvim/normal.h\
|src/nvim/ops.h\
|src/nvim/option.h\
|src/nvim/option_defs.h\
|src/nvim/option_vars.h\
|src/nvim/os/fileio.h\
|src/nvim/os/fs.h\
|src/nvim/os/input.h\
|src/nvim/os/lang.h\
|src/nvim/os/pty_conpty_win.h\
|src/nvim/os/pty_process_unix.h\
|src/nvim/os/pty_process_win.h\
|src/nvim/path.h\
|src/nvim/plines.h\
|src/nvim/popupmenu.h\
|src/nvim/profile.h\
|src/nvim/quickfix.h\
|src/nvim/regexp.h\
|src/nvim/regexp_defs.h\
|src/nvim/search.h\
|src/nvim/sign.h\
|src/nvim/spell.h\
|src/nvim/spell_defs.h\
|src/nvim/statusline.h\
|src/nvim/statusline_defs.h\
|src/nvim/strings.h\
|src/nvim/syntax.h\
|src/nvim/testing.h\
|src/nvim/textformat.h\
|src/nvim/textobject.h\
|src/nvim/tui/input.h\
Expand All @@ -287,8 +249,6 @@ iwyu: build/.ran-cmake
|src/nvim/ui.h\
|src/nvim/ui_client.h\
|src/nvim/ui_compositor.h\
|src/nvim/undo.h\
|src/nvim/usercmd.h\
|src/nvim/version.h\
|src/nvim/vim.h\
|src/nvim/viml/parser/expressions.h\
Expand Down
40 changes: 0 additions & 40 deletions src/clint.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,49 +897,32 @@ def CheckIncludes(filename, lines, error):
# These should be synced with the ignored headers in the `iwyu` target in
# the Makefile.
check_includes_ignore = [
"src/nvim/api/buffer.h",
"src/nvim/api/command.h",
"src/nvim/api/extmark.h",
"src/nvim/api/options.h",
"src/nvim/api/private/defs.h",
"src/nvim/api/private/dispatch.h",
"src/nvim/api/private/helpers.h",
"src/nvim/api/private/validate.h",
"src/nvim/api/ui.h",
"src/nvim/api/vim.h",
"src/nvim/api/vimscript.h",
"src/nvim/api/win_config.h",
"src/nvim/api/window.h",
"src/nvim/arglist.h",
"src/nvim/ascii.h",
"src/nvim/assert.h",
"src/nvim/autocmd.h",
"src/nvim/autocmd_defs.h",
"src/nvim/buffer.h",
"src/nvim/buffer_defs.h",
"src/nvim/buffer_updates.h",
"src/nvim/bufwrite.h",
"src/nvim/change.h",
"src/nvim/channel.h",
"src/nvim/charset.h",
"src/nvim/cmdexpand.h",
"src/nvim/cmdexpand_defs.h",
"src/nvim/cmdhist.h",
"src/nvim/context.h",
"src/nvim/cursor.h",
"src/nvim/decoration.h",
"src/nvim/decoration_defs.h",
"src/nvim/decoration_provider.h",
"src/nvim/diff.h",
"src/nvim/digraph.h",
"src/nvim/drawline.h",
"src/nvim/drawscreen.h",
"src/nvim/edit.h",
"src/nvim/eval.h",
"src/nvim/eval/buffer.h",
"src/nvim/eval/decode.h",
"src/nvim/eval/encode.h",
"src/nvim/eval/funcs.h",
"src/nvim/eval/typval.h",
"src/nvim/eval/typval_defs.h",
"src/nvim/eval/typval_encode.h",
Expand All @@ -959,46 +942,34 @@ def CheckIncludes(filename, lines, error):
"src/nvim/ex_cmds.h",
"src/nvim/ex_cmds_defs.h",
"src/nvim/ex_docmd.h",
"src/nvim/ex_eval_defs.h",
"src/nvim/ex_getln.h",
"src/nvim/extmark.h",
"src/nvim/extmark_defs.h",
"src/nvim/file_search.h",
"src/nvim/fileio.h",
"src/nvim/fold.h",
"src/nvim/fold_defs.h",
"src/nvim/garray.h",
"src/nvim/getchar.h",
"src/nvim/globals.h",
"src/nvim/grid.h",
"src/nvim/grid_defs.h",
"src/nvim/hashtab.h",
"src/nvim/highlight.h",
"src/nvim/highlight_defs.h",
"src/nvim/highlight_group.h",
"src/nvim/indent.h",
"src/nvim/indent_c.h",
"src/nvim/input.h",
"src/nvim/insexpand.h",
"src/nvim/keycodes.h",
"src/nvim/linematch.h",
"src/nvim/log.h",
"src/nvim/lua/executor.h",
"src/nvim/macros.h",
"src/nvim/main.h",
"src/nvim/map.h",
"src/nvim/mapping.h",
"src/nvim/mapping_defs.h",
"src/nvim/mark.h",
"src/nvim/mark_defs.h",
"src/nvim/marktree.h",
"src/nvim/match.h",
"src/nvim/mbyte.h",
"src/nvim/mbyte_defs.h",
"src/nvim/memfile_defs.h",
"src/nvim/memline.h",
"src/nvim/memory.h",
"src/nvim/menu.h",
"src/nvim/message.h",
"src/nvim/mouse.h",
"src/nvim/move.h",
Expand All @@ -1009,31 +980,22 @@ def CheckIncludes(filename, lines, error):
"src/nvim/normal.h",
"src/nvim/ops.h",
"src/nvim/option.h",
"src/nvim/option_defs.h",
"src/nvim/option_vars.h",
"src/nvim/os/fileio.h",
"src/nvim/os/fs.h",
"src/nvim/os/input.h",
"src/nvim/os/lang.h",
"src/nvim/os/pty_conpty_win.h",
"src/nvim/os/pty_process_unix.h",
"src/nvim/os/pty_process_win.h",
"src/nvim/path.h",
"src/nvim/plines.h",
"src/nvim/popupmenu.h",
"src/nvim/profile.h",
"src/nvim/quickfix.h",
"src/nvim/regexp.h",
"src/nvim/regexp_defs.h",
"src/nvim/search.h",
"src/nvim/sign.h",
"src/nvim/spell.h",
"src/nvim/spell_defs.h",
"src/nvim/statusline.h",
"src/nvim/statusline_defs.h",
"src/nvim/strings.h",
"src/nvim/syntax.h",
"src/nvim/testing.h",
"src/nvim/textformat.h",
"src/nvim/textobject.h",
"src/nvim/tui/input.h",
Expand All @@ -1042,8 +1004,6 @@ def CheckIncludes(filename, lines, error):
"src/nvim/ui.h",
"src/nvim/ui_client.h",
"src/nvim/ui_compositor.h",
"src/nvim/undo.h",
"src/nvim/usercmd.h",
"src/nvim/version.h",
"src/nvim/vim.h",
"src/nvim/viml/parser/expressions.h",
Expand Down
4 changes: 2 additions & 2 deletions src/nvim/api/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <lua.h> // IWYU pragma: keep
#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/buffer_defs.h"
#include "nvim/buffer_defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/buffer.h.generated.h"
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/extmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/decoration_defs.h" // IWYU pragma: keep
#include "nvim/macros.h"
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/option_defs.h" // IWYU pragma: keep

Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/private/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>

#include "nvim/api/private/defs.h"
#include "nvim/memory.h"
#include "nvim/memory_defs.h"
#include "nvim/types_defs.h"

typedef Object (*ApiDispatchWrapper)(uint64_t channel_id, Array args, Arena *arena, Error *error);
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/vim.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/vimscript.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/win_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <stdint.h> // IWYU pragma: keep

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/api/window.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "nvim/api/keysets_defs.h"
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/arglist.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h"
#include "nvim/types_defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "arglist.h.generated.h"
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/bufwrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "nvim/buffer_defs.h" // IWYU pragma: keep
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/pos_defs.h"
#include "nvim/pos_defs.h" // IWYU pragma: keep

#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "bufwrite.h.generated.h"
Expand Down
Loading

0 comments on commit 718053b

Please sign in to comment.