diff --git a/CHANGELOG.md b/CHANGELOG.md index 1040dedd0d..09b9aaf7ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ A brief description of the categories of changes: version dependency select statements when the `experimental_target_platforms` includes the Python ABI. The default python version case within the select is also now handled correctly, stabilizing the implementation. +* (gazelle) Fix Gazelle failing on Windows with + "panic: runtime error: invalid memory address or nil pointer dereference" ### Added * (rules) Precompiling Python source at build time is available. but is diff --git a/gazelle/pythonconfig/pythonconfig.go b/gazelle/pythonconfig/pythonconfig.go index 726b145aaf..aa9255290c 100644 --- a/gazelle/pythonconfig/pythonconfig.go +++ b/gazelle/pythonconfig/pythonconfig.go @@ -16,7 +16,7 @@ package pythonconfig import ( "fmt" - "path/filepath" + "path" "strings" "github.com/emirpasic/gods/lists/singlylinkedlist" @@ -126,7 +126,7 @@ type Configs map[string]*Config // ParentForPackage returns the parent Config for the given Bazel package. func (c *Configs) ParentForPackage(pkg string) *Config { - dir := filepath.Dir(pkg) + dir := path.Dir(pkg) if dir == "." { dir = "" }