Bug (or maybe 2) in v1.5.0
firmbeliever opened this issue · 5 comments
I think a bug (or potentially 2) was introduced in version 1.5.0.
Bug 1:
After upgrading to version 1.5.0, I started to get a dispatching error saying there was no method matching the signature for the replace() method. Looking at the diff between 1.4.9 and 1.5.0 in src/OnlineStatsBase.jl, the call to replace() in function name() was updated to a one-line call (line 82). If I open a Julia repl, create a dummy string and those 2 bool vars, and then run that call to replace, I'm getting the same error.
The full error is:
ERROR: MethodError: no method matching replace(::String, ::Pair{Regex, String}, ::Pair{String, String})
Closest candidates are:
replace(::AbstractString, ::Pair, ::Pair) at set.jl:613
replace(::Any, ::Pair...; count) at set.jl:555
replace(::Union{Function, Type}, ::Pair, ::Pair; count) at set.jl:612
...
Potential bug 2:
As part of that same change, it looks like the logic was flipped regarding which regex is used based on the values of those 2 bools. E.g. the regex for replacing periods used to be used when withmodule was false, but now it's used when withmodule is true. And same goes for withparams. I'm not sure if this was correct before and wrong now or vice-versa, hence me not being sure if this is a bug.
Thanks for the issue.
What version of Julia are you using? I thought I added a lower bound to the Julia version so that the replace(x, pairs...)
would be available, but maybe I got the version wrong.
It's version 1.6.6. Looks like there is a lower bound of 1.6.5.
I'll fix the bound.
Take note that you are using an older version than even the LTS (Long-term-support) release. I'd upgrade to 1.8.2 if you can: https://julialang.org/downloads/
Thanks. The Julia version is unfortunately out of my control.
Out of curiosity, what about the potential bug 2 I mentioned?
the first bug should be solved by #34