I have a weird issue that I am unable to reproduce in a MWE. It happens in the context of a reasonably large project.
Some methods are not available despite their libraries being loaded. For instance:
MethodError: no method matching dot(::Vector{Float64}, ::Vector{Float64})
Indeed, methods(dot) returns 0 methods, despite LinearAlgebra being loaded. The same happened recently, in the same project, with Base.collect.
From some experimentation, it seems to be the case that the issue occurs if and only if PreallocationTools (which is awesome!) is loaded. However, I was unable to reproduce that behaviour in a MWE.
Any pointers to what the issue could be would be much appreciated. Cheers.
I would need an MWE to see what’s going on there. PreallocationTools.jl is both small and does nothing particularly odd, you can read the whole source in like 15 minutes:
I would think PreallocationTools is a red herring here and it’s actually something completely different.
That’s what I would guess. But dot is neither imported, used, nor exported from PreallocationTools. It does not show up in the source at all. So something is shadowing it, but not PreallocationTools. Are you sure @joaovgranja you don’t have a dot(x,y) = ... overload somewhere and forgot to LinearAlgebra.dot(x,y)?
That was my first suspicion too, but no, I haven’t overloaded dot. And the same issue happens with Base.collect, which is also not overloaded. Still unable to track the issue down. Thanks for the MWE, @fatteneder!