Pre-flight checks
What happened?
When two PowerShell classes define the same method name, $this.Pick() in Alpha.Run produces a definite call edge to Beta.Pick. This makes the graph show a dependency on the wrong class.
The expected call is Alpha.Run -> Alpha.Pick. Member calls should retain the receiver's class identity; a receiver that cannot be established should remain unresolved rather than selecting another class by method name.
Steps to reproduce
Save the following as two_classes.ps1:
class Alpha {
[int] Pick() { return 1 }
[int] Run() { return $this.Pick() }
}
class Beta {
[int] Pick() { return 2 }
[int] Run() { return $this.Pick() }
}
Run the source extractor directly, without an AST cache:
from pathlib import Path
from graphify.extractors.powershell import extract_powershell
result = extract_powershell(Path("two_classes.ps1"))
for edge in result["edges"]:
if edge.get("relation") == "calls":
print(edge["source"], "->", edge["target"])
Compare the class-qualified node IDs, since both method nodes have the label .Pick().
Error output or graph output
Class-normalized call edges from the real source extractor:
Alpha.Run -> Beta.Pick (EXTRACTED)
Beta.Run -> Beta.Pick (EXTRACTED)
The fixture parses without tree-sitter errors. An explicit [Alpha]::Make() likewise selects Beta.Make when both classes declare Make.
Graphify version
0.9.77; tested source 5c7b84792f453582676548185aaec3824d51dfe2 on v8.
Operating System
macOS
Python Version
3.12
Installation Method
built from source (git clone)
Additional Environment Details
Python 3.12.11, tree-sitter 0.25.2 and tree-sitter-powershell 0.26.4, using a source snapshot with local dependencies. PowerShell source is parsed, not executed. The direct extractor probe bypasses the corpus AST cache and needs no model request.
Additional context
#3992 and #3995 fixed previously dropped member calls; that fix is present. This report concerns the remaining receiver-identity error, not missing PowerShell support. Variable type inference, cross-file dispatch and bare-command/function name collisions are separate scope.
Pre-flight checks
What happened?
When two PowerShell classes define the same method name,
$this.Pick()inAlpha.Runproduces a definite call edge toBeta.Pick. This makes the graph show a dependency on the wrong class.The expected call is
Alpha.Run -> Alpha.Pick. Member calls should retain the receiver's class identity; a receiver that cannot be established should remain unresolved rather than selecting another class by method name.Steps to reproduce
Save the following as
two_classes.ps1:Run the source extractor directly, without an AST cache:
Compare the class-qualified node IDs, since both method nodes have the label
.Pick().Error output or graph output
Class-normalized call edges from the real source extractor:
The fixture parses without tree-sitter errors. An explicit
[Alpha]::Make()likewise selectsBeta.Makewhen both classes declareMake.Graphify version
0.9.77; tested source
5c7b84792f453582676548185aaec3824d51dfe2onv8.Operating System
macOS
Python Version
3.12
Installation Method
built from source (git clone)
Additional Environment Details
Python 3.12.11, tree-sitter 0.25.2 and tree-sitter-powershell 0.26.4, using a source snapshot with local dependencies. PowerShell source is parsed, not executed. The direct extractor probe bypasses the corpus AST cache and needs no model request.
Additional context
#3992 and #3995 fixed previously dropped member calls; that fix is present. This report concerns the remaining receiver-identity error, not missing PowerShell support. Variable type inference, cross-file dispatch and bare-command/function name collisions are separate scope.