Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug (or maybe 2) in v1.5.0 #32

Closed
firmbeliever opened this issue Nov 17, 2022 · 5 comments
Closed

Bug (or maybe 2) in v1.5.0 #32

firmbeliever opened this issue Nov 17, 2022 · 5 comments

Comments

@firmbeliever
Copy link

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.

@joshday
Copy link
Owner

joshday commented Nov 17, 2022

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.

@firmbeliever
Copy link
Author

It's version 1.6.6. Looks like there is a lower bound of 1.6.5.

@joshday
Copy link
Owner

joshday commented Nov 17, 2022

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/

@firmbeliever
Copy link
Author

Thanks. The Julia version is unfortunately out of my control.

Out of curiosity, what about the potential bug 2 I mentioned?

@longemen3000
Copy link

longemen3000 commented Jun 24, 2023

the first bug should be solved by #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants