JuliaText / TextAnalysis.jl

Julia package for text analysis
Other
374 stars 96 forks source link

UndefVarError: Base.warn_once in deprecations.jl #109

Closed jaketothepast closed 5 years ago

jaketothepast commented 5 years ago

This appears to be an issue with 1.0 compatibility, but I attempted to run the following

julia> remove_punctuation!(s[1])
ERROR: UndefVarError: warn_once not defined
Stacktrace:
 [1] remove_punctuation!(::StringDocument{String}) at /home/jake/.julia/packages/TextAnalysis/h7oB5/src/deprecations.jl:31
 [2] top-level scope at none:0

A cursory search of the Julia 1.0 docs did not prove fruitful looking for a Base.warn_once method. I searched github for Base.warn_once fixes and saw usage of the Compat.@warn macro, maybe we could use that?

I'm brand new to Julia and wouldn't mind tackling this issue if possible!

cchderrick commented 5 years ago

I think the proper way in 1.0 is ...

@warn "Test" maxlog=1

the maxlog control how many times it pops up, so in this case, it would be 1 for once.

aviks commented 5 years ago

Hi Jake, yes this is the codebase showing its age. It should be easy to fix, we'd welcome a PR.

jaketothepast commented 5 years ago

Wonderful, I'm glad a PR was submitted as well!

aviks commented 5 years ago

Closed by #112