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

Default to not showing deprecation warnings #35362

Merged
merged 7 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 6 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: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ Language changes
* The line number of function definitions is now added by the parser as an
additional `LineNumberNode` at the start of each function body ([#35138]).

Command-line option changes
---------------------------

* Deprecation warnings are no longer shown by default. i.e. if the `--depwarn=...` flag is
not passed it defaults to `--depwarn=no`. ([#35362]).

* Color now defaults to on when stdout and stderr are TTYs ([#34347])

Multi-threading changes
Expand Down
6 changes: 3 additions & 3 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ function julia_cmd(julia=joinpath(Sys.BINDIR::String, julia_exename()))
end
isempty(compile) || push!(addflags, "--compile=$compile")
end
let depwarn = if opts.depwarn == 0
"no"
let depwarn = if opts.depwarn == 1
"yes"
elseif opts.depwarn == 2
"error"
else
"" # default = "yes"
"" # default = "no"
end
isempty(depwarn) || push!(addflags, "--depwarn=$depwarn")
end
Expand Down
2 changes: 1 addition & 1 deletion src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jl_options_t jl_options = { 0, // quiet
1, // debug_level [release build]
#endif
JL_OPTIONS_CHECK_BOUNDS_DEFAULT, // check_bounds
JL_OPTIONS_DEPWARN_ON, // deprecation warning
JL_OPTIONS_DEPWARN_OFF, // deprecation warning
0, // method overwrite warning
1, // can_inline
JL_OPTIONS_POLLY_ON, // polly
Expand Down
3 changes: 2 additions & 1 deletion test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ end

include("testenv.jl")

let flags = Cmd(filter(a->!occursin("depwarn", a), collect(test_exeflags)))

let flags = Cmd(replace.(test_exeflags, r"^--depwarn=.*" => "--depwarn=yes"))
oxinabox marked this conversation as resolved.
Show resolved Hide resolved
oxinabox marked this conversation as resolved.
Show resolved Hide resolved
local cmd = `$test_exename $flags deprecation_exec.jl`
oxinabox marked this conversation as resolved.
Show resolved Hide resolved

if !success(pipeline(cmd; stdout=stdout, stderr=stderr))
Expand Down