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

Feature request: use color to improve readability of various reports #225

Open
fingolfin opened this issue Oct 31, 2023 · 2 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@fingolfin
Copy link
Member

fingolfin commented Oct 31, 2023

I really like how JET uses color to make its reports more readable.

Perhaps we can do the same for Aqua. E.g. in such a report:

Ambiguity #1
rand(X, t::Type{<:Array}, dims::Integer...) @ RandomExtensions ~/.julia/packages/RandomExtensions/4ml47/src/containers.jl:106
rand(L::AbstractAlgebra.Generic.Loc{T}, num_scale, den_scale) where T<:ZZRingElem @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/HeckeMoreStuff.jl:1077

Possible fix, define
  rand(::AbstractAlgebra.Generic.Loc{T}, ::Type{<:Array}, ::Integer) where T<:Nemo.ZZRingElem

Ambiguity #2
*(a::T, b::AbstractAlgebra.FracElem{T}) where T<:RingElem @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/dsta0/src/Fraction.jl:345
*(a::Nemo.ZZRingElem, b::AbstractAlgebra.FracElem) @ Nemo ~/Projekte/OSCAR/Nemo.jl/src/flint/adhoc.jl:450

Possible fix, define
  *(::T, ::AbstractAlgebra.FracElem{T}) where T<:Nemo.ZZRingElem

I would imagine that Ambiguity #1 etc. gets one color, Possible fix, define another; but then also the method names could be colored as well as filenames etc.

The JET printing code is quite elaborate but I think we could get already get substantial benefits with something much simpler (e.g. a lot of the complexity in JET is having to deal with visualizing a "stack" nicely, which in e.g. the ambiguities report is not needed at all.

@lgoettgens lgoettgens added the enhancement New feature or request label Oct 31, 2023
@lgoettgens
Copy link
Collaborator

We could even use the new StyledStrings.jl for this. That should make it a lot easier to implement

@lgoettgens lgoettgens added this to the 0.8.x milestone Oct 31, 2023
@fingolfin
Copy link
Member Author

But StyledStrings.jl currently requires Julia 1.11 ... though there seem to be plans to make a release for Julia >= 1.0 at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants