You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bazel run gazelle fails on Windows with the below error. As per Python Gazelle plugin:
Gazelle will walk up the filesystem from a Python file to find this metadata, looking for a file called gazelle_python.yaml in an ancestor folder of the Python code.
and because pythonconfig.go#ParentForPackage delegates to filepath.Dir(pkg) to replace the separator character "\" with "/", hence for a 2-levels deep path, e.g. rootDir\nestedDir1\nestedDir2, a parent is searched with "/" (rootDir/nestedDir1) but Configs contains a key with "\" (rootDir\nestedDir1).
🔬 Minimal Reproduction
Run rules_python_gazelle_plugin on Windows in a project with at least 2-levels deep directory structure.
…emory address or nil pointer dereference" (#1872)
This pull request fixes `bazel run gazelle` failing on Windows with
"panic: runtime error: invalid memory address or nil pointer
dereference" if there is a path with at least 2-levels deep directory.
Fixes#1871
---------
Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
🐞 bug report
Affected Rule
The issue is caused by the rule:rules_python_gazelle_plugin
Is this a regression?
No
Description
bazel run gazelle
fails on Windows with the below error. As per Python Gazelle plugin:and because pythonconfig.go#ParentForPackage delegates to filepath.Dir(pkg) to replace the separator character "\" with "/", hence for a 2-levels deep path, e.g. rootDir\nestedDir1\nestedDir2, a parent is searched with "/" (rootDir/nestedDir1) but Configs contains a key with "\" (rootDir\nestedDir1).
🔬 Minimal Reproduction
Run rules_python_gazelle_plugin on Windows in a project with at least 2-levels deep directory structure.
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: