build(IWYU): export generated headers

This commit is contained in:
dundargoc 2023-11-27 18:46:03 +01:00 committed by dundargoc
parent f4aedbae4c
commit e38a053692
13 changed files with 14 additions and 19 deletions

View File

@ -2,19 +2,6 @@
{ ref: "c99.imp" },
{ ref: "posix.imp" },
# 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/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.h.generated.h"', private, '"nvim/api/ui.h"', public ] },
# Symbols
{ symbol: [ "FUNC_ATTR_ALLOC_ALIGN", private, '"nvim/func_attr.h"', public ] },
{ symbol: [ "FUNC_ATTR_ALLOC_SIZE", private, '"nvim/func_attr.h"', public ] },
{ symbol: [ "FUNC_ATTR_ALLOC_SIZE_PROD", private, '"nvim/func_attr.h"', public ] },
@ -31,13 +18,12 @@
{ symbol: [ "FUNC_ATTR_PURE", private, '"nvim/func_attr.h"', public ] },
{ symbol: [ "FUNC_ATTR_UNUSED", private, '"nvim/func_attr.h"', public ] },
{ symbol: [ "FUNC_ATTR_WARN_UNUSED_RESULT", private, '"nvim/func_attr.h"', public ] },
{ symbol: [ "MAX", private, '"nvim/macros.h"', public ] },
{ symbol: [ "MIN", private, '"nvim/macros.h"', public ] },
{ symbol: [ "extern_proc", private, '<uv.h>', public ] },
{ symbol: [ "iovec", private, '<sys/uio.h>', public ] },
# Third party headers
{ include: [ '"keysets_defs.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] },
{ include: [ '<uv/unix.h>', private, '<uv.h>', public ] },
]

View File

@ -10,6 +10,7 @@
#include "nvim/api/autocmd.h"
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/private/validate.h"
#include "nvim/autocmd.h"

View File

@ -8,6 +8,7 @@
#include "nvim/api/extmark.h"
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/private/validate.h"
#include "nvim/buffer_defs.h"

View File

@ -5,6 +5,7 @@
#include "nvim/api/keysets.h"
#include "nvim/api/options.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/private/validate.h"
#include "nvim/autocmd.h"

View File

@ -26,6 +26,6 @@ extern const MsgpackRpcRequestHandler method_handlers[];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/private/dispatch.h.generated.h"
# include "api/private/dispatch_wrappers.h.generated.h"
# include "api/private/dispatch_wrappers.h.generated.h" // IWYU pragma: export
# include "keysets_defs.generated.h"
#endif

View File

@ -10,5 +10,5 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "api/ui.h.generated.h"
# include "ui_events_remote.h.generated.h"
# include "ui_events_remote.h.generated.h" // IWYU pragma: export
#endif

View File

@ -5,6 +5,7 @@
#include "nvim/api/extmark.h"
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/win_config.h"
#include "nvim/ascii.h"

View File

@ -5,6 +5,7 @@
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/private/validate.h"
#include "nvim/api/window.h"

View File

@ -10,6 +10,7 @@
#include "klib/kvec.h"
#include "nvim/api/keysets.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/private/validate.h"
#include "nvim/ascii.h"

View File

@ -13,6 +13,7 @@
#include "nvim/api/keysets.h"
#include "nvim/api/private/converter.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/buffer_defs.h"

View File

@ -11,10 +11,12 @@
#include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
// IWYU pragma: begin_exports
# include "os/env.h.generated.h"
# include "os/mem.h.generated.h"
# include "os/stdpaths.h.generated.h"
# include "os/users.h.generated.h"
// IWYU pragma: end_exports
#endif
#define ENV_LOGFILE "NVIM_LOG_FILE"

View File

@ -122,7 +122,7 @@ typedef struct ui_event_callback {
// uncrustify:off
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui.h.generated.h"
# include "ui_events_call.h.generated.h"
# include "ui_events_call.h.generated.h" // IWYU pragma: export
#endif
// uncrustify:on

View File

@ -39,6 +39,6 @@ EXTERN bool ui_client_forward_stdin INIT( = false);
// uncrustify:off
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_client.h.generated.h"
# include "ui_events_client.h.generated.h"
# include "ui_events_client.h.generated.h" // IWYU pragma: export
#endif
// uncrustify:on