Repository navigation
[Backport release/3.0.0] Update extra paths configuration for all workflows (#6644) - #7655
Conversation
…sim#6644) Fixes isaac-sim#6475. This change makes Python import-path configuration consistent across Isaac Lab source checkouts, installed packages, and generated external projects, including both VS Code/Pylance and Cursor/basedpyright. The configuration is split by ownership: - Checked-in Pyright policy lives in `pyproject.toml`. - Machine-specific paths are written to a git-ignored `pyrightconfig.json` that extends the project policy. - VS Code settings retain interpreter and editor behavior without defining a competing `python.analysis.extraPaths` value. The shared `isaaclab.utils.editor` utility discovers: - Isaac Sim extension paths from the selected installation. - Isaac Lab monorepo packages under `source/*`. - Standard downstream packages under a `src` layout. - Isaac Lab packages visible to the active interpreter, covering editable and wheel installs. The repository setup script and installed-package workflow now use that shared utility. The template generator copies the canonical setup wrapper instead of maintaining a second implementation, and the generated `pyproject.toml`, README, tests, and documentation are aligned with the new single-package uv `src` layout introduced on `develop`. Invalid explicit `--isaac_path` values now fail clearly rather than silently selecting another installation. No new runtime dependency is required. - Bug fix (non-breaking change which fixes an issue) - Documentation update - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` Not applicable. - `uv run pytest source/isaaclab_rl/test/test_template_generator.py source/isaaclab/test/cli/test_installed_workflow_entrypoints.py -q` — 34 passed - `uv run pytest --confcutdir=tools/template tools/template/test_cli.py -q` — 7 passed - `uv run pytest source/isaaclab/test/cli/test_wheel_builder_metadata.py -q` — 11 passed - Pyright 1.1.411 configuration check — 0 errors and 0 warnings - `uv run isaaclab -f` — passed, including changelog validation against the current upstream `develop` - `uv run --isolated --extra dev -- make -C docs current-docs` — warning-free build passed - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the pre-commit checks with `uv run isaaclab -f` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name already exists in `CONTRIBUTORS.md` (cherry picked from commit c91b036)
This PR should not merge until the editor setup command stops silently destroying existing workspace and Pyright configuration. Findings
|
| f"// Generated from: {settings_source}\n" | ||
| ) | ||
| settings_path = vscode_dir / "settings.json" | ||
| settings_path.write_text(header + settings, encoding="utf-8") |
There was a problem hiding this comment.
Editor Configs Are Overwritten
Running isaaclab --editor now replaces both .vscode/settings.json and pyrightconfig.json without checking whether they already exist. In the aggregate-wheel workflow, the replaced --generate-vscode-settings command asked for confirmation before overwriting existing settings. Users upgrading to this command can therefore silently lose workspace-specific interpreter, formatter, language-server, and Pyright settings. Please preserve or merge existing files, or require confirmation before replacing them.
|
run-ci |
There was a problem hiding this comment.
Isaac Lab Review Bot
The backport consistently centralizes editor setup under isaaclab --editor, but it introduces three compatibility and behavior regressions: established editor CLI options are removed without deprecation, existing workspace settings can be overwritten without confirmation, and the generated Pyright configuration attempts to inherit project policy through an unsupported TOML extends target.
- Design and architecture: Consolidating the duplicated setup scripts into
isaaclab.utils.editoris coherent, but the generatedpyrightconfig.jsonbecomes the effective root configuration while attempting to extendpyproject.toml. Pyright'sextendsmechanism expects another JSON configuration, so the checked-in[tool.pyright]policy is not reliably inherited as documented. - API: The user-facing
-v/--vscodeoption and aggregate-wheel--generate-vscode-settingsoption are deliberately rejected after this change. That is a concrete CLI compatibility break on a release branch and conflicts with the repository requirement to deprecate public APIs before removal. Compatibility aliases should warn and forward tocommand_editorfor a transition period. - Implementation: Isaac Sim discovery and path aggregation are otherwise coherent, but
setup_editorunconditionally writes.vscode/settings.json, removing the aggregate-wheel workflow's protection for existing customized settings. It also writes{"extends":"./pyproject.toml"}, which does not provide the promised inheritance of the project's Pyright policy. Existing settings should be preserved, merged, or interactively confirmed, and the generated configuration should inherit from a supported JSON base or contain the required policy directly.
Significant concerns. Posted 3 actionable findings inline.
Automated review; human maintainers own approval decisions.
| "--vscode", | ||
| action="store_true", | ||
| help="Generate the VSCode settings file from template.", | ||
| "--editor", |
There was a problem hiding this comment.
🟡 Warning · Api — Editor CLI flags removed without deprecation
-v/--vscode is deleted here and the wheel shim drops --generate-vscode-settings, so isaaclab -v, ./isaaclab.sh --vscode, and python -m isaaclab --generate-vscode-settings now exit with argparse status 2 on a release branch; the added test asserts this rejection. Repository policy requires prior deprecation and a migration path. Keep both as hidden aliases that warn and forward to command_editor for one release.
| f"// Generated from: {settings_source}\n" | ||
| ) | ||
| settings_path = vscode_dir / "settings.json" | ||
| settings_path.write_text(header + settings, encoding="utf-8") |
There was a problem hiding this comment.
🟡 Warning · Implementation — Editor settings overwritten without confirmation
The replaced aggregate-wheel workflow prompted before replacing an existing .vscode/settings.json, and the installation docs still warned about that confirmation. setup_editor now writes unconditionally into project_dir or Path.cwd(), so running the documented command in an already configured workspace silently discards customized settings. Preserve or merge an existing file, or restore the confirmation when running interactively.
| """ | ||
| config: dict[str, object] = {"extraPaths": extra_paths} | ||
| if (project_dir / "pyproject.toml").is_file(): | ||
| config["extends"] = "./pyproject.toml" |
There was a problem hiding this comment.
🟡 Warning · Implementation — Generated pyright config extends a TOML file
Pyright's extends names another JSON configuration file, and a present pyrightconfig.json supersedes [tool.pyright]. Emitting {"extends": "./pyproject.toml"} therefore does not inherit the checked-in policy (exclude of _isaac_sim, reportMissingImports = "none", typeCheckingMode) that the new docs promise, and this file is written automatically at the end of command_install. Copy the policy into the generated JSON or extend a JSON base config.
Description
Backports #6644 to
release/3.0.0by cherry-picking merged commitc91b03687f4f4c753553b6d3617a75d988b973e5with-xprovenance.The automatic backport run encountered conflicts in the installed-workflow regression test and aggregate-wheel entry point, then failed while resolving those conflicts.
This manual backport preserves the release branch's installed-workflow test structure. The aggregate wheel stores the installed
isaaclab.__main__shim attools/wheel_builder/res/__main__.py, so the source change tosource/isaaclab/isaaclab/__main__.pyis applied at that release-specific path. The resulting file is byte-for-byte identical to the source PR result.Fixes #6475.
c91b03687f4f4c753553b6d3617a75d988b973e5190888dbbec9d783a0032e2894af6566f0d690df928cf344f54220a344ce46aba01188e79c6628cdType of change
Release backport
Validation
__main__.pyrelocation described above; the mapped source and backport blobs are identical.uv lock --checkpassed.uv run --frozen --extra test python -m pytest source/isaaclab/test/cli/test_install_command_parsing.py source/isaaclab/test/cli/test_installed_workflow_entrypoints.py source/isaaclab/test/cli/test_wheel_builder_metadata.py -q— 78 passed.uv run --frozen --extra test python -m pytest source/isaaclab_rl/test/test_template_generator.py -q— 24 passed.uv run --frozen --extra test python -m pytest --confcutdir=tools/template tools/template/test_cli.py -q— 7 passed.isaaclab --editorsmoke passed in a clean temporary workspace; an invalid explicit--isaac_pathexited with status 2.uv run --frozen isaaclab -fpassed.uv run --frozen --extra test -- make -C docs current-docspassed without warnings.git diff --check upstream/release/3.0.0...HEADpassed.Checklist
CONTRIBUTORS.md.