Giter Club home page Giter Club logo

Comments (8)

MikeInnes avatar MikeInnes commented on June 20, 2024 1

I don't think it'd be that hard to do, when we hit a function call just check what module the relevant method is in. I think there's also some scope for the UI side to do filtering based on current file or module, though.

from traceur.jl.

pfitzseb avatar pfitzseb commented on June 20, 2024

Runtime is a concern though, so it'd be nice to be able to set a max depth or indeed only analyse functions in a specific module/file.

from traceur.jl.

MikeInnes avatar MikeInnes commented on June 20, 2024

We could also have a set of "known good" functions or signatures that we always skip. You have to be a bit careful with that (higher order functions are always at risk for example) but profiling would probably turn up some things safe to skip.

from traceur.jl.

yakir12 avatar yakir12 commented on June 20, 2024

Cool idea. Like everything in Base, or other user supplied modules.

from traceur.jl.

x-ji avatar x-ji commented on June 20, 2024

All I get seem to be tons of warnings about lines in sysimg.jl, event.jl, coreio.jl, error.jl, abstractdict.jl etc. before anything about my own code even appears. Is it normal? Or do they still imply problems in my code. How may I interpret the outputs?

Example:

┌ Warning: getproperty returns Union{Int64, Ptr{Nothing}, AbstractString, Array{UInt8,1}}
└ @ sysimg.jl:18
┌ Warning: dynamic dispatch to ((Base.getfield)(itr, ondone))()
└ @ io.jl:880
┌ Warning: getproperty returns Union{Bool, IOStream, Function}
└ @ sysimg.jl:18
┌ Warning: getproperty returns Union{Int64, Ptr{Nothing}, AbstractString, Array{UInt8,1}}
└ @ sysimg.jl:18
┌ Warning: getproperty returns Union{Bool, IOStream, Function}
└ @ sysimg.jl:18
┌ Warning: getproperty returns Union{Bool, IOStream, Function}
└ @ sysimg.jl:18
┌ Warning: getproperty returns Union{Int64, Ptr{Nothing}, AbstractString, Array{UInt8,1}}
└ @ sysimg.jl:18

Edit: With the latest master version of the package, the getproperty returns Union messages are gone, though some other messages not about sysimg.jl are still there:

┌ Warning: getindex returns Union{Char, String}
└ @ tuple.jl:24
Reading training corpus┌ Warning: uses global variable Base.uv_jl_writecb_task
└ @ stream.jl:810
┌ Warning: get returns Any
└ @ abstractdict.jl:597
┌ Warning: uses global variable Base.uv_eventloop
└ @ libuv.jl:89
┌ Warning: dynamic dispatch to (Base.rethrow)($(Expr(:the_exception)))
└ @ event.jl:190
┌ Warning: Base.try_yieldto returns Any
└ @ event.jl:186
┌ Warning: reftask is assigned as Union{Nothing, RefValue{Task}}
└ @ event.jl:253
┌ Warning: wait returns Any
└ @ event.jl:244
┌ Warning: get returns Any
└ @ abstractdict.jl:597
┌ Warning: getindex returns Any
└ @ abstractdict.jl:601
┌ Warning: pop! returns Any
└ @ abstractdict.jl:607
┌ Warning: pop! returns Any
└ @ abstractdict.jl:619
┌ Warning: buf is assigned as Union{Nothing, GenericIOBuffer{Array{UInt8,1}}}
└ @ stream.jl:837
┌ Warning: dynamic dispatch to (Base.bytesavailable)((Base.getfield)(s, sendbuf))
└ @ stream.jl:838
┌ Warning: dynamic dispatch to (Base.unsafe_write)((Base.getfield)(s, sendbuf), p, n)
└ @ stream.jl:840
┌ Warning: dynamic dispatch to (Base.unsafe_write)((Base.getfield)(s, sendbuf), p, n)
└ @ stream.jl:846

┌ Warning: buf is assigned as Union{Nothing, GenericIOBuffer{Array{UInt8,1}}}
└ @ stream.jl:870
┌ Warning: dynamic dispatch to (getfield(Base, Symbol("#kw##schedule"))())(%new(NamedTuple{(:error,),Tuple{Bool}}, error), Base.schedule, φ (%19 => %15, %141 => %136), arg)
└ @ event.jl:68
┌ Warning: dynamic dispatch to (Base.schedule)(φ (%19 => %15, %141 => %136), arg)
└ @ event.jl:68
┌ Warning: dynamic dispatch to (getfield(Base, Symbol("#kw##schedule"))())(%new(NamedTuple{(:error,),Tuple{Bool}}, error), Base.schedule, (Base.arrayref)(true, (Base.getfield)(c, waitq), 1),arg)
└ @ event.jl:74
┌ Warning: dynamic dispatch to (Base.schedule)((Base.arrayref)(true, (Base.getfield)(c, waitq), 1), arg)
└ @ event.jl:74
┌ Warning: x is assigned as Union{Char, String}
└ @ strings/io.jl:41
┌ Warning: uses global variable Base.stdout
└ @ coreio.jl:4
┌ Warning: dynamic dispatch to (Base.println)(π (Base.stdout, IO), (getfield)(xs, 1))
└ @ coreio.jl:4
┌ Warning: dynamic dispatch to (Base.getproperty)(Base.Main, Base)
└ @ error.jl:106
┌ Warning: dynamic dispatch to (Base.getproperty)((Base.getproperty)(Base.Main, Base), SystemError)
└ @ error.jl:106
┌ Warning: dynamic dispatch to ((Base.getproperty)((Base.getproperty)(Base.Main, Base), SystemError))(p, $(Expr(:foreigncall, :jl_errno, Int32, svec(), :ccall, 0)), extrainfo)
└ @ error.jl:106
┌ Warning: dynamic dispatch to ((Base.getfield)(itr, ondone))()
└ @ io.jl:880

from traceur.jl.

kurbkid avatar kurbkid commented on June 20, 2024

I get similar dynamic dispatch and Union warnings form tuple.jl and bitarray.jl.
Does this mean that a lot of base functions are not adhering to the highest quality standards?
Or that I am using the functions wrong?

from traceur.jl.

mkborregaard avatar mkborregaard commented on June 20, 2024

I get warnings galore from dict.jl, iterators.jl and tuple.jl as well - limiting depth to the present module (or a list of modules for org packages; or just anything non-Base) would be great.

from traceur.jl.

mkborregaard avatar mkborregaard commented on June 20, 2024

Thanks for the quick fix!

from traceur.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.