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

Message "failed to highlight code" in every step after @enter #303

Closed
adediego opened this issue Jan 9, 2022 · 5 comments
Closed

Message "failed to highlight code" in every step after @enter #303

adediego opened this issue Jan 9, 2022 · 5 comments

Comments

@adediego
Copy link

adediego commented Jan 9, 2022

I get this message when using @enter in a fresh julia environment (Debugger v0.7.0, Julia 1.7.1 on Fedora 35):

julia> using Debugger
julia> @enter sin(1)
failed to highlight code, TypeError(Symbol("keyword argument"), :bold, Union{Nothing, Bool}, :nothing)
failed to highlight code, TypeError(Symbol("keyword argument"), :bold, Union{Nothing, Bool}, :nothing)
In sin(x) at math.jl:1218
 1218  @eval function ($f)(x::Real)
>1219      xf = float(x)
 1220      x === xf && throw(MethodError($f, (x,)))
 1221      return ($f)(xf)
 1222  end

About to run: (float)(1)
1|debug> 

The message disappeared when I changed all appearances of :nothing to nothing in Format.render at line 201 of printing.jl, but I only had a very superficial look on the code so I'm not sure if that would be the right fix.

@simeonschaub
Copy link

The message disappeared when I changed all appearances of :nothing to nothing in Format.render at line 201 of printing.jl, but I only had a very superficial look on the code so I'm not sure if that would be the right fix.

Yes, do you want to make a PR? Alongside, the compat bound for Crayons.jl should also be changed to require Crayons 4.1.

@KristofferC
Copy link
Member

:(. That API break in Crayons was a mistake from my side..

@KristofferC
Copy link
Member

Should be fixed by #304. Sorry for the slow response.

@adediego
Copy link
Author

adediego commented Feb 3, 2022

No problem, thanks for the great work!

Alongside, the compat bound for Crayons.jl should also be changed to require Crayons 4.1.

This is still missing, right?

@KristofferC
Copy link
Member

Yeah, let's add that too.

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

No branches or pull requests

3 participants