Skip to content

fix: normalize stub_path in repl.bzl #3104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jpwoodbu
Copy link

When a REPL target is run from an external Bazel module, the stub_path can have path components in it (e.g. "/..") which get rejected by the Rlocation() function in runfiles.py for not being normalized. This commit normalizes the path before it's passed to Rlocation().

Fixes #3101

When a REPL target is run from an external Bazel module, the `stub_path` can have path components in it (e.g. "/..") which get rejected by the `Rlocation()` in `runfiles.py`. This commit normalizes the path before it's passed to `Rlocation()`.
@aignas
Copy link
Collaborator

aignas commented Jul 19, 2025

I saw windows errors had mixed path separators and I wonder if using the bazel skylib helper is causing this.

Maybe trying out os.path.norm would be also an option - the path does not have to exist for it to work, so I think it may be still OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REPL invocation fails with "path is not normalized"
2 participants