Skip to content

Fixes M1 3.0 GA Issues - #5343

Merged
kellyguo11 merged 4 commits into
isaac-sim:developfrom
myurasov-nv:my-m1-fixes-2
Apr 22, 2026
Merged

kellyguo11 merged 4 commits into
isaac-sim:developfrom
myurasov-nv:my-m1-fixes-2

Conversation

@myurasov-nv

@myurasov-nv myurasov-nv commented Apr 21, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes 3.0 GA M1 issues.

Code changes in this PR fix:

  • NVBug 5985028 (also fixes 5984996) - Win11 isaaclab.bat install + Sim-binary detection on conda.
  • NVBug 5992915 - docs version selector now picks up pre-release tags like v3.0.0-beta.

Triaged separately (no code changes needed in this PR):

  • NVBug 5974917 - hf-xet pip metadata error: fixed via PR#4992 plus Artifactory cache purge.
  • NVBug 5994306 - Docker image not found: already fixed in PR#5189 (ISAACSIM_VERSION=6.0.0-dev2).
  • NVBug 5974684 - pip [newton] warp-lang conflict: already aligned (warp-lang==1.12.0 in tools/wheel_builder/res/python_packages.toml). Needs next-rc-wheel re-verify.
  • NVBug 5983721 - pip pillow conflict: already aligned (pillow==12.1.1 in tools/wheel_builder/res/python_packages.toml). Needs next-rc-wheel re-verify.
  • NVBug 5983082 - duplicate of 5979273 (Isaac Sim sensors.rtx Windows DLL chain).
  • NVBug 5627823 - VDR docs feedback: item 1 already fixed on develop via -u/--uv; remaining items split into follow-ups.

This should complete M1 issues.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Apr 21, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation infrastructure labels Apr 21, 2026
@myurasov-nv
myurasov-nv marked this pull request as ready for review April 21, 2026 12:07
@greptile-apps

greptile-apps Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes several M1 3.0 GA issues: it rewrites the Windows/Linux launcher scripts to auto-source setup_conda_env.* for local Isaac Sim binaries, escapes cmd.exe metacharacters in subprocess calls, extends the docs version-selector regex to include pre-release tags, and improves the missing-Sim error message.

  • The .gitignore entry **/__* is overly broad and will silently prevent any new __init__.py or __main__.py from being tracked, which can cause hard-to-diagnose import failures in future PRs.

Confidence Score: 4/5

Safe to merge after revisiting the .gitignore **/__* pattern, which can silently discard new Python source files.

The core bug fixes are correct and well-scoped. One P1 finding exists in .gitignore where **/__* would silently ignore future __init__.py files; the P2 findings are edge cases unlikely to trigger in practice.

.gitignore (line 84 — overly broad **/__* pattern).

Important Files Changed

Filename Overview
.gitignore Adds dev-time and CI artifact patterns; the new **/__* rule is overly broad and would silently ignore any new __init__.py or __main__.py files added to the repo.
source/isaaclab/isaaclab/cli/utils.py Adds _escape_for_cmd_exe to wrap .bat/.cmd invocations in cmd.exe /c so pip version specifiers with `<>
isaaclab.bat Rewrites Windows entry point to resolve python from VIRTUAL_ENV/CONDA_PREFIX/_isaac_sim and sources setup_conda_env.bat before invoking the CLI.
isaaclab.sh Adds sourcing of setup_conda_env.sh for local Isaac Sim binary; PYTHONPATH set before sourcing may be overwritten by the script.
docs/conf.py Extends smv_tag_whitelist regex to accept pre-release tags like v3.0.0-beta or v3.0.0-rc1 in the version selector.
.github/workflows/docs.yaml CI multi-version build now passes matching SMV_TAG_WHITELIST (v2+, including pre-release) and SMV_BRANCH_WHITELIST overrides as env vars.
source/isaaclab_tasks/isaaclab_tasks/utils/sim_launcher.py Adds a targeted error message when omni.kit is missing but a local _isaac_sim directory is present, guiding users to source the correct env setup script.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["isaaclab.bat / isaaclab.sh"] --> B{VIRTUAL_ENV set?}
    B -- yes --> E[use venv python]
    B -- no --> C{CONDA_PREFIX set?}
    C -- yes --> F[use conda python]
    C -- no --> D{_isaac_sim symlink present?}
    D -- yes --> G["source setup_conda_env.*\nuse _isaac_sim/python.*"]
    D -- no --> H[fallback: system python]
    E & F & G & H --> I["python -c 'from isaaclab.cli import cli; cli()'"]
    I --> J{needs_kit?}
    J -- yes --> K{omni.kit importable?}
    K -- yes --> L[AppLauncher.launch]
    K -- no --> M["_escape_for_cmd_exe\n(wrap .bat in cmd.exe /c)\n+ detailed error hint"]
    J -- no --> N[kitless: Newton/OvPhysX path]
Loading

Reviews (1): Last reviewed commit: "Source _isaac_sim env from launchers and..." | Re-trigger Greptile

Comment thread .gitignore
**/.ruff_cache/

# Dev-time files, generated stuff
**/__*

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.

P1 Overly broad pattern silently ignores new __init__.py files

The pattern **/__* matches any untracked file or directory starting with __ at any depth, which includes __init__.py, __main__.py, __all__, etc. Any new Python package added after this commit whose __init__.py hasn't been staged yet will be silently git-ignored, causing mysterious import failures that are hard to diagnose.

Consider scoping this more narrowly to only the generated/dev-time files you intend to ignore:

Suggested change
**/__*
**/__autosummary__/
**/__generated__/

Or, if the intent is to catch auto-generated init files specifically, use **/__pycache__/ (already present) and a more targeted pattern like **/__*__/ for double-underscore-wrapped directories only.

Comment on lines 159 to 165
@@ -167,8 +164,7 @@ def _escape_for_cmd_exe(cmd: list[str] | tuple[str, ...]) -> str | list[str]:
else:
parts.append(s)

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.

P2 Arguments containing embedded double-quotes produce malformed quoting

When an argument contains a double-quote character and one of the _CMD_METACHARACTERS (or a space/tab), the wrapping f'"{s}"' produces a broken quoted string. For example, the argument foo"<bar becomes "foo"<bar", which cmd.exe /c would misparse: the quote closes after foo, leaving <bar" unquoted and the < again acting as a redirect.

In practice, pip version-specifiers never embed double quotes, so this is unlikely to trigger today. But the escaper should handle this robustly. The standard cmd.exe escaping for an embedded double-quote inside a "-delimited field is to double it (""):

if any(c in s for c in _CMD_METACHARACTERS) or " " in s or "\t" in s:
    parts.append('"' + s.replace('"', '""') + '"')
else:
    parts.append(s)

Comment thread isaaclab.sh
Comment on lines 29 to +37
export PYTHONPATH="$ISAACLAB_PATH/source/isaaclab:$PYTHONPATH"

# If a local Isaac Sim binary is present, source its env setup so that
# PYTHONPATH/PATH/EXP_PATH are correct without depending on a conda
# activate.d hook (those don't fire reliably under e.g. `conda run`).
if [ -f "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" ]; then
# shellcheck disable=SC1091
. "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" >/dev/null 2>&1 || true
fi

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.

P2 setup_conda_env.sh may overwrite the already-set PYTHONPATH

PYTHONPATH is exported on line 29 so source/isaaclab is importable. Then setup_conda_env.sh is sourced on lines 34-37. If that script does export PYTHONPATH=... (unconditional assignment rather than prepend), the source/isaaclab entry is silently dropped and the subsequent from isaaclab.cli import cli call fails.

The typical pattern is to source first and then prepend:

Suggested change
export PYTHONPATH="$ISAACLAB_PATH/source/isaaclab:$PYTHONPATH"
# If a local Isaac Sim binary is present, source its env setup so that
# PYTHONPATH/PATH/EXP_PATH are correct without depending on a conda
# activate.d hook (those don't fire reliably under e.g. `conda run`).
if [ -f "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" ]; then
# shellcheck disable=SC1091
. "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" >/dev/null 2>&1 || true
fi
# If a local Isaac Sim binary is present, source its env setup so that
# PYTHONPATH/PATH/EXP_PATH are correct without depending on a conda
# activate.d hook (those don't fire reliably under e.g. `conda run`).
if [ -f "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" ]; then
# shellcheck disable=SC1091
. "$ISAACLAB_PATH/_isaac_sim/setup_conda_env.sh" >/dev/null 2>&1 || true
fi
# Add source/isaaclab to PYTHONPATH so we can import isaaclab.cli.
# Done after sourcing setup_conda_env.sh so our entry is not overwritten.
export PYTHONPATH="$ISAACLAB_PATH/source/isaaclab:$PYTHONPATH"

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

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.

🤖 Isaac Lab Review Bot

Summary

This PR fixes Windows .bat invocation issues with cmd.exe metacharacters, adds pre-release tag support to the docs version selector, and improves error messaging when Isaac Sim is not detected. The implementation is straightforward and addresses the documented NVBug issues correctly.

Architecture Impact

No cross-module impact — changes are self-contained:

  • _escape_for_cmd_exe() change affects only Windows .bat/.cmd invocations via run_command()
  • Launcher scripts (isaaclab.sh/isaaclab.bat) changes are entry-point additions that source existing Isaac Sim env setup scripts
  • sim_launcher.py adds user-facing diagnostic output only
  • Regex changes in docs version whitelist are isolated to sphinx-multiversion configuration

Implementation Verdict

Ship it — Clean implementation, no issues found. The changes are minimal, targeted, and address specific bugs without introducing regressions.

Test Coverage

This PR fixes infrastructure/tooling issues (Windows shell escaping, env sourcing, docs config) that are inherently difficult to unit test:

  • Windows metacharacter fix: Would require Windows CI environment to test properly. The fix is a well-understood pattern (cmd.exe /c "...") for handling this class of issues.
  • Env sourcing in launchers: These are setup scripts that run before tests execute — they bootstrap the test environment itself.
  • Docs regex change: Validated by visual inspection; CI docs build passes.
  • Improved error hint: Informational output only; no behavioral change to test.

Given the nature of these fixes (tooling, platform-specific edge cases, diagnostics), the lack of new unit tests is acceptable. The pre-commit checks pass, and the existing test suite exercises the core functionality.

CI Status

4 failing jobs, but failures are unrelated to this PR:

  • isaaclab_tasks [1/3], [2/3]: ValueError: Unable to compare versions for packaging>=20.0: need=20.0 found=None — a packaging library metadata issue in existing Cartpole-RGB-TheiaTiny tests, not caused by these changes.
  • environments_training: Same underlying issue.
  • test-skillgen: Separate test infrastructure issue.

All failures occur in existing tests that do not touch the modified files. The failing tests also fail on develop.

Findings

No issues to flag. The implementation is correct:

  1. _escape_for_cmd_exe return type change: The function signature changed from str | list[str] to list[str], now returning ["cmd.exe", "/c", " ".join(parts)] for .bat/.cmd files. This is correct — subprocess.run() handles both list and string commands, and wrapping in cmd.exe /c is the canonical way to prevent metacharacter interpretation on Windows.

  2. Launcher env sourcing: Adding source setup_conda_env.sh / call setup_conda_env.bat before CLI execution correctly handles the conda run edge case where activate.d hooks do not fire. The || true / >NUL ensures the launcher does not fail if the script is absent or errors.

  3. Docs regex update: (-[A-Za-z0-9.]+)?$ correctly matches optional pre-release suffixes like -beta, -rc1, -alpha.1. The regex is anchored and non-greedy as expected.

  4. Improved Isaac Sim error hint: The extra_hint logic correctly detects when _isaac_sim exists but omni.kit is not importable, providing actionable guidance for Win11/conda users.

@kellyguo11
kellyguo11 merged commit 3d42b11 into isaac-sim:develop Apr 22, 2026
27 of 31 checks passed
bdilinila pushed a commit to bdilinila/IsaacLab that referenced this pull request Apr 29, 2026
# Description

Fixes 3.0 GA M1 issues.

Code changes in this PR fix:

- NVBug 5985028 (also fixes 5984996) - Win11 isaaclab.bat install +
Sim-binary detection on conda.
- NVBug 5992915 - docs version selector now picks up pre-release tags
like v3.0.0-beta.

Triaged separately (no code changes needed in this PR):

- NVBug 5974917 - hf-xet pip metadata error: fixed via PR#4992 plus
Artifactory cache purge.
- NVBug 5994306 - Docker image not found: already fixed in PR#5189
(ISAACSIM_VERSION=6.0.0-dev2).
- NVBug 5974684 - pip [newton] warp-lang conflict: already aligned
(warp-lang==1.12.0 in tools/wheel_builder/res/python_packages.toml).
Needs next-rc-wheel re-verify.
- NVBug 5983721 - pip pillow conflict: already aligned (pillow==12.1.1
in tools/wheel_builder/res/python_packages.toml). Needs next-rc-wheel
re-verify.
- NVBug 5983082 - duplicate of 5979273 (Isaac Sim sensors.rtx Windows
DLL chain).
- NVBug 5627823 - VDR docs feedback: item 1 already fixed on develop via
-u/--uv; remaining items split into follow-ups.

This should complete M1 issues.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with ./isaaclab.sh --format
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's config/extension.toml file
- [x] I have added my name to the CONTRIBUTORS.md or my name already
exists there
klakhi added a commit to klakhi/IsaacLab that referenced this pull request May 6, 2026
When isaaclab.bat is invoked via `conda run`, the activate.d hooks
that source setup_conda_env.bat are not fired on Windows. PR isaac-sim#5343
added a direct `call` to setup_conda_env.bat from isaaclab.bat, but
this silently fails when setup_conda_env.bat uses setlocal/endlocal
internally, discarding its own env changes before returning.

Additionally, batch-level env changes cannot satisfy the Python 3.8+
DLL loading requirement: os.add_dll_directory() must be called from
within the Python process itself, not just via PATH.

Fix on two levels:

1. isaaclab.bat: add belt-and-suspenders `for /f cmd /c "call &&
   set"` approach alongside the existing direct `call`. A fresh
   cmd subprocess captures the resulting env vars and applies them
   to the parent session even when setup_conda_env.bat uses setlocal.

2. sim_launcher.py: add _try_setup_isaacsim_env_windows() helper
   that fires when omni.kit is not found on Windows with a local
   _isaac_sim present. Applies setup_conda_env.bat env changes
   (PYTHONPATH, PATH, os.add_dll_directory) directly inside the
   running Python process. Entirely wrapped in try/except --
   zero impact on working setups, Linux, or pip-installed Isaac Sim.

Addresses NVBug 5984996.
hujc7 added a commit that referenced this pull request Jun 5, 2026
…5980)

## Summary

- Removes the `**/__*` rule from `.gitignore` (introduced in #5343),
which matched every untracked path component starting with `__` at any
depth — silently ignoring all new `__init__.py` / `__init__.pyi` files.
- Any Python package added after #5343 had its init files dropped from
`git add`, causing import failures on a clean checkout that are hard to
trace back to `.gitignore`. On the current `develop` working tree this
already hides **199** untracked `__init__.py` / `__init__.pyi` files
under newly added `isaaclab_tasks` subpackages.
- No loss of coverage: the pattern's only concrete target,
`__pycache__/`, is already handled by the pre-existing `**/__pycache__/`
rule (line 20).

## 1. Problem

The `# Dev-time files, generated stuff` block added `**/__*` as a
catch-all. Git applies `.gitignore` to untracked files, so while
already-tracked init files are unaffected, every *new* package's
`__init__.py` is silently ignored:

```
$ git check-ignore -v source/isaaclab_tasks/isaaclab_tasks/core/__init__.py
.gitignore:84:**/__*	source/isaaclab_tasks/isaaclab_tasks/core/__init__.py
```

This produces "module not found" failures after a clean checkout that
give no hint they originate from `.gitignore`.

## 2. Fix

Remove the `**/__*` line and its comment. The block's only real target
was `__pycache__/`, which `**/__pycache__/` already covers.

```diff
 # Ruff cache
 **/.ruff_cache/
 
-# Dev-time files, generated stuff
-**/__*
-
 # Isaac Lab CI environments in native mode
 **/_isaaclab_install_ci_*
```

## 3. Verification

```
# new package init files are tracked again:
$ git check-ignore -v source/isaaclab_tasks/isaaclab_tasks/core/__init__.py
(no output — not ignored)

# __pycache__ is still ignored via the existing rule:
$ git check-ignore -v foo/__pycache__/bar.pyc
.gitignore:20:**/__pycache__/	foo/__pycache__/bar.pyc
```

Dev-infra/tooling change with no user-facing effect, so no changelog
fragment is added (the changelog gate only requires fragments for
managed packages touched under `source/`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants