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

StackOverflowError during import of DataFrames #1

Open
Arkoniak opened this issue Apr 21, 2021 · 6 comments
Open

StackOverflowError during import of DataFrames #1

Arkoniak opened this issue Apr 21, 2021 · 6 comments

Comments

@Arkoniak
Copy link

Arkoniak commented Apr 21, 2021

It looks like the package uses too broad assumptions. It seems that if package exports already extended function everything go sideways.

When trying to do @usingmerge DataFrames I encounter the following error

using UsingMerge
@usingmerge verbose=3 DataFrames

# skipping lines

# DataFrames.convert conflicts with Base.convert --- adding methods#= /home/skoffer/.julia/
packages/UsingMerge/jdqiP/src/UsingMerge.jl:86 =# @doc #= /home/skoffer/.julia/packages/Usi
ngMerge/jdqiP/src/UsingMerge.jl:86 =# @doc(DataFrames.convert) Base.convert
 and docs
(Base.convert(::Type{T}, x::Ptr) where T <: Integer) = DataFrames.convert(T, x)
(Base.convert(::Type{Pair{A, B}}, x::Pair{A, B}) where {A, B}) = DataFrames.convert(Pair{A,
 B}, x)
(Base.convert(::Type{Pair{A, B}}, x::Pair) where {A, B}) = DataFrames.convert(Pair{A, B}, x
)
Base.convert(::Type{IOContext}, io::IO) = DataFrames.convert(IOContext, io)
(Base.convert(::Type{Some{T}}, x::Some{T}) where T) = DataFrames.convert(Some{T}, x)
(Base.convert(::Type{Some{T}}, x::Some) where T) = DataFrames.convert(Some{T}, x)
(Base.convert(::Type{LinearAlgebra.Adjoint{T, S}}, A::LinearAlgebra.Adjoint) where {T, S})
= DataFrames.convert(LinearAlgebra.Adjoint{T, S}, A)
ERROR:
SYSTEM (REPL): showing an error caused an error
ERROR:
SYSTEM (REPL): caught exception of type StackOverflowError while trying to handle a nested
exception; giving up
@jmichel7
Copy link
Owner

jmichel7 commented Apr 21, 2021 via email

@Arkoniak
Copy link
Author

Ah, it's a pity, really. Because most of the packages were written without the notion of using @usingmerge :-) It restricts it's usage significantly.

Now, it would be an enhancement of my package to usemerge only some methods
in a package and not all. If I am motivated by having some users I might
try to program that...

I do not know how to motivate you, but I think such an enhancement would be very useful. Also, just a wild idea, maybe some aspects/methodology of SnoopCompiler.jl can be utilized? It seems that they know how to get all methods instances, definitions , arguments and backedges. Maybe this information can be useful for automatical determination what can and can not be reexported.

@Arkoniak
Copy link
Author

And anyway, thank you for your package. I've read that long discourse discussion and was not convinced with the argumentation of the current design choice. It's good that someone can try to overcome these restrictions.

@jmichel7
Copy link
Owner

jmichel7 commented Apr 21, 2021 via email

@jmichel7
Copy link
Owner

jmichel7 commented Apr 28, 2021 via email

@Arkoniak
Copy link
Author

This is awesome, thank you!
I'll write if I encounter any new issues.

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

2 participants