Warning when running test

Hi,
I have created a package and while running

(MyPackage) pkg> test MyPackage

I get the following warning:

Warning: `merge(uri::URI; kw...)` is deprecated, use  `URI(uri; kw...)` instead.
caller = ip:0x0
@Core : -1

All tests passed.

How can I know from which lign the warning is coming from and how can I fix it?

MyPackage is using HTTP, CSV, DataFrames, Dates, EzXML, Base64, Test and ProgressMeter

Thank you

julia> using HTTP

julia> methods(merge)
# 12 methods for generic function "merge":
[1] merge(d::AbstractDict, others::AbstractDict...) in Base at abstractdict.jl:311
[2] merge(combine::Union{Function, Type}, d::AbstractDict, others::AbstractDict...) in Base at abstractdict.jl:356
[3] merge(a::NamedTuple{(), T} where T<:Tuple, b::NamedTuple{(), T} where T<:Tuple) in Base at namedtuple.jl:256
[4] merge(a::NamedTuple{(), T} where T<:Tuple, b::NamedTuple) in Base at namedtuple.jl:257
[5] merge(a::NamedTuple) in Base at namedtuple.jl:265
[6] merge(a::NamedTuple, b::NamedTuple{(), T} where T<:Tuple) in Base at namedtuple.jl:255
[7] merge(a::NamedTuple{an, T} where T<:Tuple, b::NamedTuple{bn, T} where T<:Tuple) where {an, bn} in Base at namedtuple.jl:242
[8] merge(a::NamedTuple, b::Base.Iterators.Pairs{var"#s79", var"#s78", var"#s77", var"#s76"} where {var"#s79", var"#s78", var"#s77", var"#s76"<:NamedTuple}) in Base at namedtuple.jl:259
[9] merge(a::NamedTuple, b::Base.Iterators.Zip{var"#s79"} where var"#s79"<:Tuple{Any, Any}) in Base at namedtuple.jl:261
[10] merge(a::NamedTuple, b::NamedTuple, cs::NamedTuple...) in Base at namedtuple.jl:263
[11] merge(a::NamedTuple, itr) in Base at namedtuple.jl:277
[12] merge(uri::URIs.URI; kw...) in URIs at C:\Users\Oli\.julia\packages\URIs\hubHc\src\deprecate.jl:1

In the last line you see it comes from package URIs and is probably used/imported by package HTTP.

After a while it will vanish when HTTP package is updated to reflect this deprecation.
Do a
(@v1.6) pkg> up
regularily.

1 Like
(@v1.6) pkg> test HTTP
     Testing HTTP
...
Running C:\Users\Oli\.julia\packages\HTTP\LXxGT\src\..\test\client.jl tests...
┌ Warning: `merge(uri::URI; kw...)` is deprecated, use `URI(uri; kw...)` instead.
│   caller = ip:0x0
└ @ Core :-1

(@v1.6) pkg> st
...
  [cd3eb016] HTTP v0.9.8
...

Still there.

1 Like

You can try running the code with

julia --depwarn=error

to get a stacktrace.

edit: You can also pass that to Pkg.test via the julia_args keyword argument.

1 Like