JuliaDebug / JuliaDebug/CodeTracking.jl

@code_string output includes comment after function

Open
#143 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
150
Forks
11
Avg merge
22m
Merged PRs (30d)
1

Description

I noticed that the @code_string macro includes comment AFTER the function source in the output. Is this expected behavior?

Here is an example:

julia> using LinearAlgebra
julia> using CodeTracking

julia> @code_string qr(X)
"function qr(A::AbstractMatrix{T}, arg...; kwargs...) where T\n    require_one_based_indexing(A)\n    AA = copy_similar(A, _qreltype(T))\n    return _qr(AA, arg...; kwargs...)\nend\n# TODO: remove in Julia v2.0"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the @code_string macro implementation in CodeTracking.jl and reproduce the qr(X) example from the issue. Trace how the function source and trailing comment are selected, then determine the intended output. Done means the behavior is clarified and, if it is incorrect, corrected with regression coverage for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.