[Feature] Join Ruby profile frames to the functions they ran
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Read the linked runtime evidence guide and packages/core/src/repowise/core/frame_resolver.py, especially _resolve and the existing language joins. Inspect speedscope.py and the issue’s rbspy fixture requirements; the linked open pull request #6384 shows work is already underway. Done means Ruby frames join to methods, blocks fold into their method, class or module body frames resolve to the file, and the sample acceptance threshold is met without changing other languages.
Written by the indexing model from the issue text.
Description
Guide: follow Adding a language to runtime evidence: joining profile frames. It covers the change to frame_resolver.py, the join order, the fixture and the acceptance bar.
Summary
rbspy writes speedscope (rbspy record --format speedscope) with each frame's file and line, and evidence add reads speedscope, but a .rb frame never joins.
packages/core/src/repowise/core/frame_resolver.py:264
if frame.language not in ("go", "python", "javascript"):
return "unsupported_language"
Mechanism
speedscope.py:101-111already builds frames fromfile,lineandname, andframe_languagetags.rbasruby.- The missing piece is a
_rubyjoin in_resolve(:286-291): span by line, then the frame name as the second signal.
Repro
# one.py PATH LANG NAME: one indexed symbol, one frame inside it
import sys
from repowise.core.frame_resolver import ProfileFrame, resolve_frames
from repowise.core.workspace.repo_index import IndexedSymbol
path, lang, fn = sys.argv[1:4]
sym = IndexedSymbol(f"{path}::{fn}", fn, fn, "method", "", path, 1, 20, "public", lang)
r = resolve_frames([ProfileFrame(f"/repo/{path}", 5, lang, fn)], root="/repo", symbols_by_file={path: [sym]})
print(r.skipped)
python one.py lib/cart.rb ruby total:
{'unsupported_language': 1}
Done looks like
- Add
rubytoFrameLanguageand a_rubyjoin. Names arrive asCart#total(instance),Cart.total(singleton) orblock in Cart#total. - Fold
block in Xandrescue in Xframes intoX. - A frame on a class or module body line resolves to the file, like Python's
<module>. - Must not change: other languages.
- Not a first issue: name grammar judgement.
Tests
A small script profiled with rbspy in speedscope format, checked in with its sources. At least 95% of repo samples join to one method, and blocks fold into their method.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day