Skip to content

IWYU: Fix some missing includes#10438

Draft
hzeller wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260515-fix-inc
Draft

IWYU: Fix some missing includes#10438
hzeller wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260515-fix-inc

Conversation

@hzeller
Copy link
Copy Markdown
Collaborator

@hzeller hzeller commented May 15, 2026

Breakdown:

src/dbSta/src/dbEditHierarchy.cc:        #include "odb/dbTypes.h" for odb::dbIoType
src/gui/src/scriptWidget.cpp:            #include "spdlog/common.h" for spdlog::level::level_enum
src/gui/src/scriptWidget.h:              #include "spdlog/sinks/sink.h" for spdlog::sinks::sink
src/odb/src/3dblox/3dblox.cpp:           #include <map> for std::map
src/odb/src/3dblox/3dblox.cpp:           #include <memory> for std::unique_ptr
src/odb/src/3dblox/3dblox.cpp:           #include <vector> for std::vector
src/odb/src/db/dbModNet.cpp:             #include <functional> for std::function
src/odb/src/db/dbModNet.cpp:             #include <string> for std::string
src/psm/src/debug_gui.h:                 #include <any> for std::any
src/psm/src/debug_gui.h:                 #include <functional> for std::function
src/rcx/src/ext.cpp:                     #include "rcx/ext_options.h" for PatternOptions
src/rcx/src/extPatterns.cpp:             #include "rcx/ext_options.h" for PatternOptions
src/rsz/src/Graphics.hh:                 #include "rsz/Resizer.hh" for rsz::BufferedNetPtr
src/rsz/src/move/MoveCandidate.cc:       #include "OptimizerTypes.hh" for rsz::Target
src/rsz/src/move/RerouteCandidate.cc:    #include "OptimizerTypes.hh" for rsz::Target
src/rsz/src/policy/SetupDirectionalPolicy.hh: #include "MoveCommitter.hh" for rsz::MoveCommitter
src/rsz/src/policy/SetupDirectionalPolicy.hh: #include "OptimizerTypes.hh" for rsz::OptimizerRunConfig
src/rsz/src/policy/SetupLegacyMtPolicy.cc: #include "policy/SetupLegacyPolicy.hh" for rsz::SetupLegacyPolicy
src/rsz/src/policy/SetupWnsPolicy.hh:    #include "MoveCommitter.hh" for rsz::MoveCommitter
src/rsz/src/policy/SetupWnsPolicy.hh:    #include "OptimizerTypes.hh" for rsz::OptimizerRunConfig
src/utl/include/utl/Logger.h:            #include "spdlog/common.h" for spdlog::level::level_enum
src/utl/include/utl/Logger.h:            #include "spdlog/logger.h" for spdlog::logger
src/utl/src/Logger.cpp:                  #include "spdlog/logger.h" for spdlog::logger
src/web/src/request_handler.cpp:         #include <map> for std::map
src/tst/src/fixture.cpp:                 #include "tools/cpp/runfiles/runfiles.h" for bazel::tools::cpp::runfiles::Runfiles

Summary

[Describe your changes here]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Impact

[How does this change the tool's behavior?]

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

[Link issues here]

@hzeller hzeller requested review from a team as code owners May 15, 2026 17:08
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates header includes across various modules, including dbSta, gui, odb, psm, rcx, rsz, and utl, to ensure all necessary dependencies are explicitly declared. It also includes minor formatting refactors in dbCompare.inc for deleted operator declarations. I have no feedback to provide as there were no review comments.

@hzeller hzeller force-pushed the feature-20260515-fix-inc branch from 5a003e4 to 83baa9e Compare May 15, 2026 17:12
Breakdown:

```
src/dbSta/src/dbEditHierarchy.cc:        #include "odb/dbTypes.h" for odb::dbIoType
src/gui/src/scriptWidget.cpp:            #include "spdlog/common.h" for spdlog::level::level_enum
src/gui/src/scriptWidget.h:              #include "spdlog/sinks/sink.h" for spdlog::sinks::sink
src/odb/src/3dblox/3dblox.cpp:           #include <map> for std::map
src/odb/src/3dblox/3dblox.cpp:           #include <memory> for std::unique_ptr
src/odb/src/3dblox/3dblox.cpp:           #include <vector> for std::vector
src/odb/src/db/dbModNet.cpp:             #include <functional> for std::function
src/odb/src/db/dbModNet.cpp:             #include <string> for std::string
src/psm/src/debug_gui.h:                 #include <any> for std::any
src/psm/src/debug_gui.h:                 #include <functional> for std::function
src/rcx/src/ext.cpp:                     #include "rcx/ext_options.h" for PatternOptions
src/rcx/src/extPatterns.cpp:             #include "rcx/ext_options.h" for PatternOptions
src/rsz/src/Graphics.hh:                 #include "rsz/Resizer.hh" for rsz::BufferedNetPtr
src/rsz/src/move/MoveCandidate.cc:       #include "OptimizerTypes.hh" for rsz::Target
src/rsz/src/move/RerouteCandidate.cc:    #include "OptimizerTypes.hh" for rsz::Target
src/rsz/src/policy/SetupDirectionalPolicy.hh: #include "MoveCommitter.hh" for rsz::MoveCommitter
src/rsz/src/policy/SetupDirectionalPolicy.hh: #include "OptimizerTypes.hh" for rsz::OptimizerRunConfig
src/rsz/src/policy/SetupLegacyMtPolicy.cc: #include "policy/SetupLegacyPolicy.hh" for rsz::SetupLegacyPolicy
src/rsz/src/policy/SetupWnsPolicy.hh:    #include "MoveCommitter.hh" for rsz::MoveCommitter
src/rsz/src/policy/SetupWnsPolicy.hh:    #include "OptimizerTypes.hh" for rsz::OptimizerRunConfig
src/utl/include/utl/Logger.h:            #include "spdlog/common.h" for spdlog::level::level_enum
src/utl/include/utl/Logger.h:            #include "spdlog/logger.h" for spdlog::logger
src/utl/src/Logger.cpp:                  #include "spdlog/logger.h" for spdlog::logger
src/web/src/request_handler.cpp:         #include <map> for std::map
src/tst/src/fixture.cpp:                 #include "tools/cpp/runfiles/runfiles.h" for bazel::tools::cpp::runfiles::Runfiles
src/odb/src/def/def/defrData.cpp:        #include "defrReader.hpp" for DEF_MSGS
src/odb/src/def/def/defrSettings.cpp:    #include "defrReader.hpp" for DEF_MSGS
```

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller hzeller force-pushed the feature-20260515-fix-inc branch from 83baa9e to e69cd93 Compare May 15, 2026 17:15
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/tst/src/fixture.cpp
#include "sta/MinMax.hh"
#include "sta/Sta.hh"
#include "tcl.h" // IWYU pragma: keep (clang-tidy, you're drunk)
#include "tools/cpp/runfiles/runfiles.h"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: 'tools/cpp/runfiles/runfiles.h' file not found [clang-diagnostic-error]

#include "tools/cpp/runfiles/runfiles.h"
         ^

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -32,6 +32,7 @@

#include "def_parser.hpp"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: 'def_parser.hpp' file not found [clang-diagnostic-error]

#include "def_parser.hpp"
         ^

@hzeller hzeller marked this pull request as draft May 15, 2026 17:58
@hzeller
Copy link
Copy Markdown
Collaborator Author

hzeller commented May 15, 2026

(will need to fix the suggestions first)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant