Avoid unnecessary inclusions in public headers
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 5 Sep 2017 23:58:22 +0000 (19:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 17 Sep 2017 18:10:50 +0000 (14:10 -0400)
commite0831b38938074ba6094cf1fc96c2fbe4bee0c09
treeac7ddc831c20c5871c20878733adeeb1ec4e1c61
parent9c225c1a3c3427a48fd7c781f6ca56a3be1aa176
Avoid unnecessary inclusions in public headers

Featured in this patch:

* In public headers, only include what is really needed by the
  declarations of the header itself. Copy forward declarations when
  possible instead of including just for the included file's forward
  declaration. Also indicate above each included header why it is
  included to justify it.

  This should prevent future bugs where we could, for example, remove an
  included header to replace it by a forward declaration, breaking some
  builds which relied on indirect inclusion (e.g. my project does not
  need to include <babeltrace/values.h> because it includes
  <babeltrace/ctf-ir/event-class.h>).

* Make all the plugin C source/header files include
  <babeltrace/babeltrace.h> instead of a bunch of public headers. This
  does not significantly increase the build time while making the source
  file much cleaner.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
100 files changed:
include/babeltrace/ctf-ir/clock-class.h
include/babeltrace/ctf-ir/clock-value.h
include/babeltrace/ctf-ir/event-class.h
include/babeltrace/ctf-ir/event.h
include/babeltrace/ctf-ir/field-path.h
include/babeltrace/ctf-ir/field-types.h
include/babeltrace/ctf-ir/fields.h
include/babeltrace/ctf-ir/stream-class.h
include/babeltrace/ctf-ir/stream.h
include/babeltrace/ctf-ir/trace.h
include/babeltrace/ctf-ir/utils.h
include/babeltrace/graph/clock-class-priority-map.h
include/babeltrace/graph/component-class-filter.h
include/babeltrace/graph/component-class-sink.h
include/babeltrace/graph/component-class-source.h
include/babeltrace/graph/component-class.h
include/babeltrace/graph/component-filter.h
include/babeltrace/graph/component-sink.h
include/babeltrace/graph/component-source.h
include/babeltrace/graph/component.h
include/babeltrace/graph/connection.h
include/babeltrace/graph/graph.h
include/babeltrace/graph/notification-heap.h
include/babeltrace/graph/notification-packet.h
include/babeltrace/graph/notification-stream.h
include/babeltrace/graph/output-port-notification-iterator.h
include/babeltrace/graph/port.h
include/babeltrace/graph/private-component-filter.h
include/babeltrace/graph/private-component-sink.h
include/babeltrace/graph/private-component-source.h
include/babeltrace/graph/private-component.h
include/babeltrace/graph/private-connection.h
include/babeltrace/graph/query-executor.h
include/babeltrace/logging.h
include/babeltrace/plugin/plugin-dev.h
include/babeltrace/plugin/plugin.h
include/babeltrace/values.h
include/babeltrace/version.h
lib/ctf-ir/attributes.c
lib/graph/component-class-sink-colander.c
lib/graph/notification/packet.c
lib/graph/notification/stream.c
plugins/ctf/common/btr/btr.c
plugins/ctf/common/btr/btr.h
plugins/ctf/common/metadata/ast.h
plugins/ctf/common/metadata/decoder.c
plugins/ctf/common/metadata/visitor-generate-ir.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/ctf/common/notif-iter/notif-iter.h
plugins/ctf/common/utils/utils.h
plugins/ctf/fs-sink/write.c
plugins/ctf/fs-sink/writer.c
plugins/ctf/fs-sink/writer.h
plugins/ctf/fs-src/data-stream-file.c
plugins/ctf/fs-src/data-stream-file.h
plugins/ctf/fs-src/fs.c
plugins/ctf/fs-src/fs.h
plugins/ctf/fs-src/metadata.c
plugins/ctf/fs-src/metadata.h
plugins/ctf/fs-src/query.c
plugins/ctf/fs-src/query.h
plugins/ctf/lttng-live/data-stream.c
plugins/ctf/lttng-live/data-stream.h
plugins/ctf/lttng-live/lttng-live-internal.h
plugins/ctf/lttng-live/lttng-live.c
plugins/ctf/lttng-live/metadata.c
plugins/ctf/lttng-live/metadata.h
plugins/ctf/lttng-live/viewer-connection.c
plugins/ctf/plugin.c
plugins/libctfcopytrace/clock-fields.c
plugins/libctfcopytrace/clock-fields.h
plugins/libctfcopytrace/ctfcopytrace.c
plugins/libctfcopytrace/ctfcopytrace.h
plugins/lttng-utils/copy.c
plugins/lttng-utils/copy.h
plugins/lttng-utils/debug-info.h
plugins/lttng-utils/plugin.c
plugins/text/dmesg/dmesg.h
plugins/text/plugin.c
plugins/text/pretty/pretty.c
plugins/text/pretty/pretty.h
plugins/text/pretty/print.c
plugins/utils/counter/counter.c
plugins/utils/counter/counter.h
plugins/utils/dummy/dummy.c
plugins/utils/dummy/dummy.h
plugins/utils/muxer/muxer.c
plugins/utils/plugin.c
plugins/utils/trimmer/copy.c
plugins/utils/trimmer/copy.h
plugins/utils/trimmer/iterator.c
plugins/utils/trimmer/iterator.h
plugins/utils/trimmer/trimmer.c
plugins/utils/trimmer/trimmer.h
tests/lib/test_bt_ctf_field_type_validation.c
tests/lib/test_bt_values.c
tests/lib/test_cc_prio_map.c
tests/lib/test_graph_topo.c
tests/lib/test_ir_visit.c
tests/plugins/test-utils-muxer.c
This page took 0.034459 seconds and 4 git commands to generate.