Seemingly simple error


#1

I was trying to borrow some sparse QR functionality from base/sparse and base/linalg of the nightly version in v0.6. So I took base/linalg/qr.jl which is a dependency of the QR functions of base/sparse, renamed it to my_qr.jl and wrapped the code in a module MY_QR. Then I modified a few things here and there in the files in base/sparse to make it compatible with v0.6 and tried to call include("sparse.jl") from this link, but I keep getting the error

ERROR: LoadError: LoadError: ArgumentError: Module MY_QR not found in current path.
Run `Pkg.add("MY_QR")` to install the MY_QR package.

when I clearly defined the module in my_qr.jl, included the file in sparse.jl and I am just trying to import the module in spqr.jl where the error is initiated. I find the error quite unexpected and being in one of those frozen mind moments, I thought of asking for help. So it would be nice if you can spare a few minutes and tell me what I am doing wrong here. Thanks a lot in advance!


#2

Perhaps you need using .MY_QR instead of using MY_QR?


#3

With that it is giving ERROR: LoadError: LoadError: UndefVarError: MY_QR not defined.


#4

import ..MY_QR: AbstractQ in your spqr.jl then.


#5

Yup that does the trick, thanks! Which part of the docs is relevant here btw? I can’t recall seeing that bit explained.


#6

Never mind, it is 16.1.4 in this.