refactor: rename DART 7 headers to snake_case (Phase 1)#2475
Conversation
…wd.hpp) Phase 1 of PascalCase → snake_case header migration. These files are DART 7 additions (not present in release-6.16) so safe for immediate case-only rename without backward compatibility concerns. Renamed 21 header files: - dart/All.hpp → dart/all.hpp - dart/Export.hpp → dart/export.hpp - dart/collision/Fwd.hpp → dart/collision/fwd.hpp - dart/common/Export.hpp → dart/common/export.hpp - dart/constraint/Fwd.hpp → dart/constraint/fwd.hpp - dart/dynamics/Fwd.hpp → dart/dynamics/fwd.hpp - dart/gui/All.hpp → dart/gui/all.hpp - dart/gui/Export.hpp → dart/gui/export.hpp - dart/gui/Fwd.hpp → dart/gui/fwd.hpp - dart/io/Export.hpp → dart/io/export.hpp - dart/lcpsolver/All.hpp → dart/lcpsolver/all.hpp - dart/math/lcp/All.hpp → dart/math/lcp/all.hpp - dart/optimizer/All.hpp → dart/optimizer/all.hpp - dart/optimizer/ipopt/Export.hpp → dart/optimizer/ipopt/export.hpp - dart/optimizer/nlopt/Export.hpp → dart/optimizer/nlopt/export.hpp - dart/optimizer/pagmo/Export.hpp → dart/optimizer/pagmo/export.hpp - dart/sensor/Fwd.hpp → dart/sensor/fwd.hpp - dart/simulation/Fwd.hpp → dart/simulation/fwd.hpp - dart/utils/Export.hpp → dart/utils/export.hpp - dart/utils/Fwd.hpp → dart/utils/fwd.hpp - dart/utils/urdf/Export.hpp → dart/utils/urdf/export.hpp Updated all internal includes to use new lowercase names. CMake will auto-generate PascalCase compatibility wrappers. See docs/onboarding/header-migration-analysis.md for full migration plan.
There was a problem hiding this comment.
💡 Codex Review
Line 1 in 22eeb6d
This new dart/math/lcp/all.hpp replaces the former All.hpp, but there is no compatibility header generated for the old name (it’s not snake_case per the compat generator). As a result, any remaining #include <dart/math/lcp/All.hpp> (e.g., examples/lcp_solvers/main.cpp:43) will now fail to compile when DART_BUILD_EXAMPLES is enabled. Update those includes or add a shim header if backward compatibility is required.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Phase 2a of PascalCase → snake_case header migration. This commit performs structural renames (e.g., BodyNode.hpp → body_node.hpp) for the dart/common module. Renamed 40 header files in dart/common/: - AspectWithVersion.hpp → aspect_with_version.hpp - ClassWithVirtualBase.hpp → class_with_virtual_base.hpp - CompositeJoiner.hpp → composite_joiner.hpp - EmbeddedAspect.hpp → embedded_aspect.hpp - FreeListAllocator.hpp → free_list_allocator.hpp - IncludeWindows.hpp → include_windows.hpp - LocalResource.hpp → local_resource.hpp - LocalResourceRetriever.hpp → local_resource_retriever.hpp - LockableReference.hpp → lockable_reference.hpp - MemoryAllocator.hpp → memory_allocator.hpp - MemoryAllocatorDebugger.hpp → memory_allocator_debugger.hpp - MemoryManager.hpp → memory_manager.hpp - NameManager.hpp → name_manager.hpp - PoolAllocator.hpp → pool_allocator.hpp - ProxyAspect.hpp → proxy_aspect.hpp - RequiresAspect.hpp → requires_aspect.hpp - ResourceRetriever.hpp → resource_retriever.hpp - SharedLibrary.hpp → shared_library.hpp - SmartPointer.hpp → smart_pointer.hpp - SpecializedForAspect.hpp → specialized_for_aspect.hpp - StlAllocator.hpp → stl_allocator.hpp - StlHelpers.hpp → stl_helpers.hpp - VersionCounter.hpp → version_counter.hpp (plus corresponding detail/ files) Updated all internal includes to use new lowercase names. CMake will auto-generate PascalCase compatibility wrappers.
Phase 2b-h of PascalCase → snake_case header migration. This commit performs structural renames for all remaining modules. Modules renamed: - dart/math: 32 files (LcpSolver, MathTypes, TriMesh, etc.) - dart/collision: 46 files (CollisionDetector, FCL/Bullet/ODE backends) - dart/constraint: 23 files (ConstraintSolver, ContactConstraint, etc.) - dart/dynamics: 96 files (BodyNode, Skeleton, Joint types, Shapes) - dart/gui: 38 files (Viewer, WorldNode, ShapeNodes, DragAndDrop) - dart/utils: 24 files (UrdfParser, SdfParser, ResourceRetrievers) - dart/sensor: 1 file (SensorManager) - dart/simulation: 1 file (SmartPointer) - dart/optimizer: 1 file (GradientDescentSolver) - dart/lcpsolver: 2 files (PivotMatrix, DeprecatedNamespace) Total: ~264 header files renamed Updated all internal includes across ~500+ source files. Updated CMakeLists.txt files with new header names. CMake will auto-generate PascalCase compatibility wrappers. Added docs/dev_tasks/header-snake-case-migration/ for task tracking.
Address Codex review feedback: - Update include in examples/lcp_solvers/main.cpp - Update documentation in docs/background/lcp/02_overview.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 067846c761
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Fix BackwardCompatibility.hpp -> backward_compatibility.hpp include in dart/utils/urdf/UrdfParser.cpp and urdf_world_parser.hpp - Add dart/All.hpp wrapper for backward compat with dart/all.hpp - Add dart/Export.hpp wrapper for backward compat with dart/export.hpp - Update CMakeLists.txt to install compatibility headers Addresses Codex review feedback about missing compatibility wrappers for top-level headers and fixes CI build failures.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d02f6ced60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The generated PascalCase All.hpp wrapper was not being installed, causing examples/tutorials using #include <dart/gui/All.hpp> to fail.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87a11e4871
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…esystems Address Codex review feedback: - Remove dart/all.hpp and dart/export.hpp (case-only duplicates) - Keep only dart/All.hpp and dart/Export.hpp (no collision) - Update ~200 files referencing lowercase top-level headers - Update examples/tutorials to use dart/gui/all.hpp - Update dart/dart.hpp deprecation message Top-level headers (All.hpp, Export.hpp) stay PascalCase for DART 7 compatibility. Submodule headers remain snake_case as migrated. Fixes case collision on macOS/Windows where All.hpp and all.hpp cannot coexist in the same directory.
Task complete - working documentation no longer needed. Key insights preserved in docs/onboarding/header-migration-analysis.md.
Phase 6-7 of header snake_case migration: Source files (~200 files): - Rename all PascalCase .cpp files to snake_case to match headers - Examples: BodyNode.cpp → body_node.cpp, CollisionDetector.cpp → collision_detector.cpp CMake modules (19 files): - Rename DARTFind*.cmake → dart_find_*.cmake - Rename CompilerCache.cmake → compiler_cache.cmake - Update cmake/dart_defs.cmake with string(TOLOWER) for dynamic includes - Update cmake/dart_Component.cmake.in template for installed components Preserved (standard CMake conventions): - Find*.cmake (CMake find module convention) - DARTConfig.cmake.in (required for find_package(DART)) Verified: build (395 targets), tests (144/144), installation, find_package(DART)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f02b95a585
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2475 +/- ##
=======================================
Coverage 66.51% 66.52%
=======================================
Files 407 407
Lines 37320 37322 +2
Branches 4919 4919
=======================================
+ Hits 24825 24827 +2
Misses 12495 12495
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Complete the PascalCase to snake_case migration for all source files. Changes: - Rename 55 dart/ library source files (case-only and acronym files) - Single-word: Skeleton.cpp → skeleton.cpp, World.cpp → world.cpp, etc. - Acronyms: DARTCollide.cpp → dart_collide.cpp, FCLTypes.cpp → fcl_types.cpp - Top-level: All.hpp → all.hpp, Export.hpp → export.hpp - Rename 34 examples/ files to snake_case - Rename 9 tests/ helper files to snake_case - Rename 145 test files from test_PascalCase.cpp to test_snake_case.cpp - Update all #include statements across the codebase - Update CMakeLists.txt files with new filenames Total: 247 files renamed, 11 files modified This completes the snake_case migration started in PR #2475. All unit tests pass.
Complete the PascalCase to snake_case migration for all source files. Changes: - Rename 55 dart/ library source files (case-only and acronym files) - Single-word: Skeleton.cpp → skeleton.cpp, World.cpp → world.cpp, etc. - Acronyms: DARTCollide.cpp → dart_collide.cpp, FCLTypes.cpp → fcl_types.cpp - Top-level: All.hpp → all.hpp, Export.hpp → export.hpp - Rename 34 examples/ files to snake_case - Rename 9 tests/ helper files to snake_case - Rename 145 test files from test_PascalCase.cpp to test_snake_case.cpp - Update all #include statements across the codebase - Update CMakeLists.txt files with new filenames Total: 247 files renamed, 11 files modified This completes the snake_case migration started in PR #2475. All unit tests pass.
Resolve merge conflicts from snake_case rename (PRs #2475, #2478): - Update includes in lemke_solver.cpp to snake_case, keep EIGEN_STACK_ALLOCATION_LIMIT fix - Update test_collision_group.cpp includes to snake_case - Update test_subject_observer.cpp includes to snake_case - Rename new test files from PascalCase to snake_case in CMakeLists.txt - Rename actual test source files to snake_case to match CMakeLists.txt
Summary
Complete header migration from PascalCase to snake_case naming convention. This PR renames ~325 header files with structural changes (multi-word names) that are safe to migrate without breaking backward compatibility.
Commits
Modules Renamed
MemoryManager.hpp→memory_manager.hppLcpSolver.hpp→lcp_solver.hppCollisionDetector.hpp→collision_detector.hppConstraintSolver.hpp→constraint_solver.hppBodyNode.hpp→body_node.hppWorldNode.hpp→world_node.hppUrdfParser.hpp→urdf_parser.hppSensorManager.hpp→sensor_manager.hppWhat's NOT in this PR
Case-only renames are deferred to DART 8 to avoid collision issues on case-insensitive filesystems (macOS, Windows):
World.hpp→world.hppFrame.hpp→frame.hppJoint.hpp→joint.hppHow Backward Compatibility Works
CMake automatically generates PascalCase wrapper headers that emit deprecation warnings:
Users can continue using old include paths during DART 7, with removal planned for DART 8.
Testing
pixi run lintpassespixi run buildpasses (383 targets)pixi run testpasses (143 tests)pixi run -e gazebo test-gz(Gazebo compatibility) - needs CIDocumentation
docs/onboarding/header-migration-analysis.md- Full migration strategydocs/dev_tasks/header-snake-case-migration/- Task tracking for resumable work