Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion example/calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#include <calculator.h>
#include <fstream>
#include <init.capnp.h>
#include <init.capnp.proxy-types.h>
#include <init.capnp.proxy.h> // NOLINT(misc-include-cleaner)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "clang-tidy: Fix misc-include-cleaner check" (90cb5a9)

Is the include-cleaner check not compatible with IWYU? When I ran IWYU it seemed to correctly add <init.capnp.proxy.h> include. Do we know if it is expected that clang-tidy would complain about this?

Same applies to other nolint below.

Copy link
Member Author

@hebasto hebasto Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the include-cleaner check not compatible with IWYU?

They seem incompatible.

When I ran IWYU it seemed to correctly add <init.capnp.proxy.h> include.

The include-what-you-use tool built from the clang_19 branch still insist on removing #include <init.capnp.proxy.h>.

It seem both linters fail to parse a convoluted template code properly.

Additionally, IWYU suggests:

#include <kj/async.h>     // for evalLater
#include <kj/common.h>    // for fwd, mv, ctor, implicitCast, instance
#include <kj/memory.h>    // for heap

for this line:https://github.com/chaincodelabs/libmultiprocess/blob/477405eda34d923bd2ba6b3abc4c4d31db84c3ea/example/calculator.cpp#L48

#include <init.h>
#include <iostream>
#include <memory>
#include <mp/proxy-io.h>
#include <printer.h>
#include <stdexcept>
#include <string>
#include <utility>

class CalculatorImpl : public Calculator
{
Expand Down
9 changes: 8 additions & 1 deletion example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@

#include <filesystem>
#include <fstream>
#include <future>
#include <init.capnp.h>
#include <init.capnp.proxy-types.h>
#include <init.capnp.proxy.h>
#include <iostream>
#include <mp/proxy-io.h>
#include <mp/util.h>
#include <stdexcept>
#include <string>
#include <thread>
#include <tuple>
#include <vector>

namespace fs = std::filesystem;

Expand Down
3 changes: 2 additions & 1 deletion example/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

#include <fstream>
#include <init.capnp.h>
#include <init.capnp.proxy-types.h>
#include <init.capnp.proxy.h> // NOLINT(misc-include-cleaner)
#include <init.h>
#include <iostream>
#include <memory>
#include <mp/proxy-io.h>
#include <printer.h>
#include <stdexcept>
#include <string>

class PrinterImpl : public Printer
{
Expand Down
11 changes: 11 additions & 0 deletions src/mp/gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,22 @@

#include <algorithm>
#include <capnp/schema-parser.h>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <errno.h>
#include <fstream>
#include <functional>
#include <kj/array.h>
#include <kj/common.h>
#include <kj/filesystem.h>
#include <kj/memory.h>
#include <kj/string.h>
#include <map>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <system_error>
#include <unistd.h>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/mp/proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <string>
#include <sys/socket.h>
#include <thread>
#include <tuple>
#include <unistd.h>
#include <utility>

Expand Down
11 changes: 6 additions & 5 deletions src/mp/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
#include <mp/util.h>

#include <errno.h>
#include <kj/array.h>
#include <kj/common.h>
#include <kj/string-tree.h>
#include <pthread.h>
#include <sstream>
#include <stdio.h>
#include <string>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <system_error>
#include <thread>
#include <unistd.h>
#include <utility>
#include <vector>

#if __linux__
#include <syscall.h>
#include <sys/syscall.h>
#endif

#ifdef HAVE_PTHREAD_GETTHREADID_NP
Expand Down
9 changes: 8 additions & 1 deletion test/mp/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <mp/proxy-types.h>
#include <mp/proxy-io.h>
#include <mp/test/foo.capnp.h>
#include <mp/test/foo.capnp.proxy.h>
#include <mp/test/foo.h>

#include <capnp/capability.h>
#include <cstdio>
#include <future>
#include <functional>
#include <memory>
#include <kj/common.h>
#include <kj/memory.h>
#include <kj/test.h>
#include <string>
#include <thread>
#include <utility>

namespace mp {
namespace test {
Expand Down