Skip to content

Commit ddf2f61

Browse files
oxinaboxKristoffer Carlsson
andauthored
Default to not showing deprecation warnings (JuliaLang#35362)
* Default to not showing deprecation warnings Co-authored-by: Kristoffer Carlsson <kricarl@student.chalmers.se>
1 parent 8057c60 commit ddf2f61

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ Language changes
7070
* The line number of function definitions is now added by the parser as an
7171
additional `LineNumberNode` at the start of each function body ([#35138]).
7272

73+
Command-line option changes
74+
---------------------------
75+
76+
* Deprecation warnings are no longer shown by default. i.e. if the `--depwarn=...` flag is
77+
not passed it defaults to `--depwarn=no`. ([#35362]).
78+
7379
* Color now defaults to on when stdout and stderr are TTYs ([#34347])
7480

7581
Command-line option changes

base/util.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ function julia_cmd(julia=joinpath(Sys.BINDIR::String, julia_exename()))
139139
end
140140
isempty(compile) || push!(addflags, "--compile=$compile")
141141
end
142-
let depwarn = if opts.depwarn == 0
143-
"no"
142+
let depwarn = if opts.depwarn == 1
143+
"yes"
144144
elseif opts.depwarn == 2
145145
"error"
146146
else
147-
"" # default = "yes"
147+
"" # default = "no"
148148
end
149149
isempty(depwarn) || push!(addflags, "--depwarn=$depwarn")
150150
end

src/jloptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jl_options_t jl_options = { 0, // quiet
5353
1, // debug_level [release build]
5454
#endif
5555
JL_OPTIONS_CHECK_BOUNDS_DEFAULT, // check_bounds
56-
JL_OPTIONS_DEPWARN_ON, // deprecation warning
56+
JL_OPTIONS_DEPWARN_OFF, // deprecation warning
5757
0, // method overwrite warning
5858
1, // can_inline
5959
JL_OPTIONS_POLLY_ON, // polly

test/misc.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,9 @@ end
654654

655655
include("testenv.jl")
656656

657+
657658
let flags = Cmd(filter(a->!occursin("depwarn", a), collect(test_exeflags)))
658-
local cmd = `$test_exename $flags deprecation_exec.jl`
659+
local cmd = `$test_exename $flags --depwarn=yes deprecation_exec.jl`
659660

660661
if !success(pipeline(cmd; stdout=stdout, stderr=stderr))
661662
error("Deprecation test failed, cmd : $cmd")

0 commit comments

Comments
 (0)