JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

Warnings #255

Closed ashleylid closed 8 years ago

ashleylid commented 8 years ago

There are a few warnings when using a couple functions:

WARNING: Base.String is deprecated, use AbstractString instead. likely near ~/.julia/v0.4/Tk/src/widgets.jl:448

while loading ~/.julia/v0.4/Tk/src/containers.jl, in expression starting on line 135 WARNING: Union(args...) is deprecated, use Union{args...} instead. in depwarn at deprecated.jl:73 in call at deprecated.jl:50 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in require at ./loading.jl:243 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in require at ./loading.jl:243 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in process_options at ./client.jl:280 in _start at ./client.jl:378

WARNING: Base.Uint8 is deprecated, use UInt8 instead.

heliosdrm commented 8 years ago

Can you please tell what functions were you trying? (If possible, with a reproducible example.) In any event, they are warnings associated to Tk, not directly Winston. Have you tried to check out the "master" version of Tk before using Winston? I.e.:

Pkg.checkout("Tk")

(And same for other dependent packages, even Winston itself. You can afterwards go back to the last "official" version with Pkg.free)

ashleylid commented 8 years ago

Sure thing, here is the example:

data = h5open("filename.h5"), "r") do file
    read(file, "depth_image")
end
display(data)
img = imagesc(data)
display(img)
savefig("depth.png")
sleep(10) # let render

This is the image generated. depth

The whole error output is:

WARNING: deprecated syntax "AbstractVecOrMat{T} (" at /home/ashley/.julia/v0.4/Winston/src/Winston.jl:96. Use "AbstractVecOrMat{T}(" instead. WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:24 WARNING: Base.Nothing is deprecated, use Void instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:24 WARNING: Union(args...) is deprecated, use Union{args...} instead. in depwarn at deprecated.jl:73 in call at deprecated.jl:50 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in require at ./loading.jl:243 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in require at ./loading.jl:243 in include at ./boot.jl:261 in include_from_node1 at ./loading.jl:304 in process_options at ./client.jl:280 in _start at ./client.jl:378 while loading /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl, in expression starting on line 24 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:25 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:27 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:27 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:71 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:91 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:91 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:93 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:93 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:103 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:105 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:112 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:112 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:130 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:142 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:142 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:145 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:145 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:148 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:148 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:151 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:151 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:154 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/IniFile/src/IniFile.jl:156 WARNING: requiring "Dates" in module "Winston" did not define a corresponding module. WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/Winston/src/config.jl:3 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/Winston/src/config.jl:3 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/Winston/src/config.jl:3 WARNING: Base.String is deprecated, use AbstractString instead. likely near /home/ashley/.julia/v0.4/Winston/src/config.jl:3 WARNING: module Winston should explicitly import * from Base 1024x1024 Array{Float32,2}: ..... [Finished in 18.7s]

heliosdrm commented 8 years ago

Most of those warnings are due to incompatibilities between Julia 0.4 and the last registered version of IniFile. You can get rid of them checking out the master version:

Pkg.checkout("IniFile")

Even with that, you'll still get the following:

WARNING: requiring "Dates" in module "Winston" did not define a corresponding module.
WARNING: module Winston should explicitly import * from Base

That's an open issue. There is a proposal to solve them in #252

ashleylid commented 8 years ago

Ok cool, thanks