Julia: functions with a `where` clause are dropped entirely
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #4127 by @rajatnagda45 — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
Research direction
Start with the Julia signature reader used by extract_julia and reproduce the issue with the provided where.jl example. Done means extraction includes a combine() node and its calls edge to merge_all; note that a linked pull request is already open.
Written by the indexing model from the issue text.
Description
Version / commit
v0.9.77 (v8 @ 5c7b847)
Environment
macOS, Python 3.13, clean checkout of v8.
What happens
Any Julia method written with a where clause is silently dropped from the graph — no node, no defines edge, and none of the calls made from its body are recorded.
where constraints are everywhere in idiomatic generic Julia, so this erases a large fraction of a real codebase's functions.
Minimal reproduction
# where.jl
function combine(a::Vector{T}, b::Vector{T}) where {T<:Number}
merge_all(a, b)
end
function merge_all(a, b)
return a
end
from graphify.extract import extract_julia
r = extract_julia("where.jl")
print([n["label"] for n in r["nodes"]])
# -> ['where.jl', 'merge_all()'] # 'combine()' is missing
print([(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"])
# -> [] # combine -> merge_all lost
Expected vs actual
- Expected: a
combine()node with acallsedge tomerge_all. - Actual:
combineis absent and its body call vanishes.
Root cause
The signature reader only looks for a direct call_expression child of the signature node, but a where method wraps the call head in a where_expression, so the name is never found and the definition falls through.
A clean checkout of v8 reproduces it. Fix PR to follow.
- Dominant language
- Python
- Stars
- 124k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Graphify-Labs/graphify
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Graphify-Labs/graphify#3763 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Graphify-Labs/graphify#3611 · 1 comment ·
Maintainers usually reply within 1 day
-
Nix supportOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Graphify-Labs/graphify#3193 · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Graphify-Labs/graphify#2871 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Graphify-Labs/graphify#2865 ·
Maintainers usually reply within 1 day
All issues in Graphify-Labs/graphify
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
onyx-dot-app/onyx#16016 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
black --check exits 0 and prints All done when a multi file run is interruptedPossibly taken @jiteshgulati claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Non-positive worker counts wait for results without starting workersPossibly taken @IlyaKhalafi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day