Having read @kristoffer.carlsson’s explanation, I actually have gone back to thinking that having something like Pkg.dir
was indeed a reasonable request. I think what we were looking for was just something that would give you whatever would be the path of the package that would be imported by import
. (It looks like this functionality is indeed provided by Base.find_package
.)
Now, I should temper this somewhat, and say that probably the reason we think this is reasonable is because many of us here are probably very used to living on the bleeding edge of packages, and when we think of a package we are always thinking about the latest release or the checked-out master. I have a feeling that if Base.find_package
got out in the wild where people would be using it for whom this would not be the case it might start to cause massive confusion.
I’m not so confident that this is always true (granted, I’ve only just started seriously messing around with CI CD). You may still need it for some packages such as coverage. Certainly you migt need it if there’s any not-explicitly-Julia-related stuff in your package directory, or perhaps for deployment of scripts.
Otherwise I agree, for the most part you shouldn’t need it. Indeed, for the original purpose of this thread, @__DIR__
is a much more appropriate solution and using Base.find_package
for such a purpose would only invite problems.