Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code warntype should show print the unstable SSA values in red/yellow #54028

Open
gbaraldi opened this issue Apr 10, 2024 · 9 comments
Open

Code warntype should show print the unstable SSA values in red/yellow #54028

gbaraldi opened this issue Apr 10, 2024 · 9 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. good first issue Indicates a good issue for first-time contributors to Julia

Comments

@gbaraldi
Copy link
Member

If you have some code like

julia> function foo(x)
       y = x[1]
       sin(y)
       end
foo (generic function with 1 method)

julia> code_warntype(foo, (Vector{Any},), optimize=true)
image

It would be useful if %17 was printed in red�

@gbaraldi gbaraldi added the display and printing Aesthetics and correctness of printed representations of objects. label Apr 10, 2024
@topolarity topolarity added the good first issue Indicates a good issue for first-time contributors to Julia label Apr 10, 2024
arhik added a commit to arhik/julia that referenced this issue Apr 28, 2024
@arhik
Copy link
Contributor

arhik commented Apr 28, 2024

I don't know the consequences of directly interpolating expression here but here is the first attempt at it. Any guiding information on coverage of IR statements in code changes made will be appreciated.

Screenshot 2024-04-29 at 12 45 15 AM

@arhik
Copy link
Contributor

arhik commented Apr 28, 2024

@gbaraldi Should line 19 be highlighted too ?

@gbaraldi
Copy link
Member Author

gbaraldi commented Apr 29, 2024

IMO, only the IR statement would have the red color, similar to how currently only ::Any is red %17 would be red as well. The whole line being red doesn't show the user what specifically is type unstable in that statement

@arhik
Copy link
Contributor

arhik commented May 17, 2024

Screenshot 2024-05-17 at 8 16 09 AM

@joseeloren
Copy link

I was checking a good first issue to start with, and I think this is solved already. Am I right?

@arhik
Copy link
Contributor

arhik commented Aug 2, 2024

@joseeloren Its partially solved and need tests. Also, I have commits on my local setup. I am struggling to make time, and I don't recollect if I have it all resolved. If you don't see any commits from me by coming weekend it's all yours.

In case you end up taking this up, the existing code is good enough for adding tests directly (I think it doesn't cover few node types yet and that can be next PR or next set of commits after passing tests for commits made so far).

joseeloren added a commit to joseeloren/julia that referenced this issue Aug 9, 2024
… tests for unstable SSA values useref values in red
@KeshavSingh2703
Copy link

Hey there, I would like to take this issue

@joseeloren
Copy link

joseeloren commented Jan 7, 2025

Hi @KeshavSingh2703 I was working on this on #55435 , but I am not getting response.

@KeshavSingh2703
Copy link

The current status includes partial tests and coverage for specific cases, though it might still need further refinements and checks for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. good first issue Indicates a good issue for first-time contributors to Julia
Projects
None yet
Development

No branches or pull requests

5 participants