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

[LoadError] function print_with_color does not accept keyword arguments #410

Closed
apieum opened this issue Nov 9, 2017 · 1 comment
Closed

Comments

@apieum
Copy link

apieum commented Nov 9, 2017

For example the code above from Base.Test for julia version 0.6.1 will trigger the load error in julia 0.5:
print_with_color(:white, rpad("Test Summary:",align," "), " |", pad; bold = true)

The fast solution I've used in my code is this which don't fix each case but is enough for me:

if VERSION < v"0.6"
    print_with_color(args...;kwargs...) = Base.print_with_color(args...)
end

See JuliaLang/julia#18628

Extract from 0.6 changes:

  • The function print_with_color can now take a color represented by an integer between 0 and 255 inclusive as its first argument (#18473). For a number-to-color mapping, please refer to this chart. It is also possible to use numbers as colors in environment variables that customizes colors in the REPL. For example, to get orange warning messages, simply set ENV["JULIA_WARN_COLOR"] = 208. Please note that not all terminals support 256 colors.
  • The function print_with_color no longer prints text in bold by default (#18628). Instead, the function now take a keyword argument bold::Bool which determines whether to print in bold or not. On some terminals, printing a color in non bold results in slightly darker colors being printed than when printing in bold. Therefore, light versions of the colors are now supported. For the available colors see the help entry on print_with_color.
@martinholters
Copy link
Member

Closing as outdated since we've dropped support for Julia prior to 1.0.

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

2 participants