Fix cloner lazy exports (#5920)#5931
Conversation
# Description Restores the package-level `isaaclab.cloner.resolve_clone_plan_source` lazy export used by the Newton RayCaster backend. This fixes Newton RayCaster task construction failures where `isaaclab_newton.sensors.ray_caster` could not import the helper from `isaaclab.cloner`. The PR also removes stale cloner stub exports that no longer have implementations, so every name in `isaaclab.cloner.__all__` resolves. These stale names were not caught by existing tests because no code or test imported or accessed `path_source_path` or `cfg_source_path`; `lazy_export()` can import the package and resolve other names without touching every `__all__` entry. No new dependencies are required for this change. @OctiZhangOctiZhang (), could you review? Fixes # (no linked issue) ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots Not applicable. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - Ran `./isaaclab.sh -f`; `ruff` formatted one file, then the full hook set was blocked because `git-lfs` is not installed in this environment. - Ran `SKIP=check-git-lfs-pointers ./isaaclab.sh -f` after formatting; all non-LFS hooks passed. - [x] I have made corresponding changes to the documentation - No documentation update was needed for this import/export fix. - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - No test was added for this simple lazy-export correction. Validation was done with the Newton RayCaster repro and a one-off import scan. Note: existing `from isaaclab.cloner import _fabric_notices` test imports do not cover this lazy-export path because `_fabric_notices` is a real package submodule, while `resolve_clone_plan_source` is a function that must be declared in `__init__.pyi` for `lazy_export()` to expose it. - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Greptile SummaryThis PR cherry-picks a bug fix that corrects the
Confidence Score: 5/5Safe to merge — the change is a minimal, verified stub correction with no functional logic. The stub now exactly mirrors what cloner_utils.py exports. The two removed symbols (cfg_source_path, path_source_path) are absent from the entire source tree, and resolve_clone_plan_source is confirmed present at line 54 of cloner_utils.py. There are no callers of the old names anywhere, so there is no breakage risk. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["isaaclab.cloner import"] --> B["__init__.py: lazy_export()"]
B --> C["Reads __init__.pyi stub for export list"]
C -->|"Before fix"| D["__all__ includes\ncfg_source_path ❌\npath_source_path ❌\n(missing resolve_clone_plan_source ❌)"]
C -->|"After fix"| E["__all__ includes\nresolve_clone_plan_source ✅\n(stale names removed ✅)"]
E --> F["cloner_utils.py\nresolve_clone_plan_source()"]
Reviews (1): Last reviewed commit: "Fix cloner lazy exports (#5920)" | Re-trigger Greptile |
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
PR #5931 — Fix cloner lazy exports (#5920)
Summary
This is a cherry-pick of #5920 onto release/3.0.0-beta2. It fixes missing lazy exports in isaaclab.cloner that caused Newton RayCaster task construction failures when trying to import resolve_clone_plan_source.
Changes Reviewed
| File | Change |
|---|---|
source/isaaclab/isaaclab/cloner/__init__.pyi |
Removes stale exports (cfg_source_path, path_source_path), adds resolve_clone_plan_source |
source/isaaclab/changelog.d/fix-cloner-lazy-exports.rst |
Adds changelog fragment |
Findings
✅ No issues found. This is a clean, minimal fix:
-
Correctness: The stale exports (
cfg_source_path,path_source_path) that no longer have implementations are properly removed from both__all__and the import block. The newresolve_clone_plan_sourceis added in alphabetical order in__all__and imported fromcloner_utilswhere it belongs. -
Alphabetical ordering: The
__all__list maintains alphabetical sort order correctly after the changes. -
Consistency: Both
__all__and thefrom .cloner_utils import (...)block are kept in sync — every name in__all__has a corresponding import statement. -
Changelog: Proper changelog fragment added following the project convention.
-
CI:
pre-commit,Build Wheel, andCheck changelog fragmentschecks have passed. Some CI jobs are still pending (Docker builds, installation tests, docs).
Verdict
👍 LGTM — Straightforward bug fix that restores a missing export and cleans up dead references. No concerns about backwards compatibility since the removed names (cfg_source_path, path_source_path) had no backing implementations.
🔍 Reviewed commit: 4639687
cherrypick bug fix for missing cloner lazy export