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

Change default warn color to yellow #18453

Merged
merged 8 commits into from
Dec 17, 2016
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Library improvements
Therefore, light versions of the colors are now supported.
For the available colors see the help entry on `print_with_color`.

* The default color for info messages has been changed from blue to cyan ([#18442]).
This can be changed back to the original color by setting the environment variable `JULIA_INFO_COLOR` to `"blue"`.
One way of doing this is by adding `ENV["JULIA_INFO_COLOR"] = :blue` to the `.juliarc.jl` file.
* The default color for info messages has been changed from blue to cyan and for warning messages from red to yellow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should put this link back (and add 18453 too)

This can be changed back to the original colors by setting the environment variables `JULIA_INFO_COLOR` to `"blue"` and `JULIA_WARN_COLOR` to `"red"`.
One way of doing this is by adding for example `ENV["JULIA_INFO_COLOR"] = :blue` and `ENV["JULIA_WARN_COLOR"] = :red` to the `.juliarc.jl` file.
For more information regarding customizing colors in the REPL, see this [manual section]( http://docs.julialang.org/en/latest/manual/interacting-with-julia/#customizing-colors).

* Iteration utilities that wrap iterators and return other iterators (`enumerate`, `zip`, `rest`,
Expand Down
2 changes: 1 addition & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ will print text with all text properties (like boldness) reset.
text_colors

have_color = false
default_color_warn = :light_red
default_color_warn = :yellow
default_color_error = :light_red
default_color_info = :cyan
if is_windows()
Expand Down
2 changes: 1 addition & 1 deletion base/pkg/entry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function status(io::IO, pkg::AbstractString, ver::VersionNumber, fix::Bool)
finalize(prepo)
end
else
print_with_color(:yellow, io, "non-repo (unregistered)")
print_with_color(Base.warn_color(), io, "non-repo (unregistered)")
end
println(io)
end
Expand Down
6 changes: 3 additions & 3 deletions base/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type Broken <: Result
orig_expr
end
function Base.show(io::IO, t::Broken)
print_with_color(:yellow, io, "Test Broken\n"; bold = true)
print_with_color(:Base.warn_color(), io, "Test Broken\n"; bold = true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the : meant to be prefixed to Base here, or just a typo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo (which I thought I fixed but maybe I forgot to commit the file).

if t.test_type == :skipped && !(t.orig_expr === nothing)
println(io, " Skipped: ", t.orig_expr)
elseif !(t.orig_expr === nothing)
Expand Down Expand Up @@ -489,7 +489,7 @@ function print_test_results(ts::DefaultTestSet, depth_pad=0)
print_with_color(Base.error_color(), lpad("Error",error_width," "), " "; bold = true)
end
if broken_width > 0
print_with_color(:yellow, lpad("Broken",broken_width," "), " "; bold = true)
print_with_color(Base.warn_color(), lpad("Broken",broken_width," "), " "; bold = true)
end
if total_width > 0
print_with_color(Base.info_color(), lpad("Total",total_width, " "); bold = true)
Expand Down Expand Up @@ -619,7 +619,7 @@ function print_counts(ts::DefaultTestSet, depth, align,

nb = broken + c_broken
if nb > 0
print_with_color(:yellow, lpad(string(nb), broken_width, " "), " ")
print_with_color(Base.warn_color(), lpad(string(nb), broken_width, " "), " ")
elseif broken_width > 0
# None broken at this level, but some at another level
print(lpad(" ", broken_width), " ")
Expand Down