-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Make Pkg.test check for ambiguities #1281
Comments
Okay looking at Pkg.test more closely it doesn't actually do
other ideas? |
With regards to identifying modules loaded during testing, it seems that this will work: nms1 = names(Main)
include("runtests.jl")
nms2 = names(Main)
mods = filter(x->isa(getfield(Main, x), Module), setdiff(nms2, nms1)) I don't think there's any real harm in extending the list beyond the main module: the idea is that a package that has dependencies shouldn't conflict with its dependencies. The only exception would be things loaded only for testing, but hopefully that will rarely be a problem. I would favor:
There's always something a little annoying about having local test results differ from Travis, of course. |
I would urge not having different results between local tests and Travis. I'll predict Two years later, when everyone involved has forgotten about this issue, it will become a major point of confusion among newcomers. For long term support and sanity, I would therefore much prefer option 2 above, with the option set to "fail on ambiguities" |
Option 2 works for me, esp. if @tkelman is willing to write that script 😄. |
what do you think it should look like, exactly? as I had it above, |
Good idea to include |
So what exactly is your suggestion? Add |
Obviously this is worth getting right since it will be a pain to do it over. Definitely recommend a few trial balloons first. I think it will be correct if we detect the loaded modules like in https://github.com/JuliaLang/julia/issues/17444#issuecomment-233400881, and then use |
I'll put What about
Is that the default behavior of |
Presumably |
I don't think this should be up to the Package manager but rather the test system. It is "cleanest" if the package manager basically just calls |
Agreed, this is definitely not a Pkg.jl issue. |
Reference JuliaLang/julia#17418 (comment). Someone who knows more about the package machinery than me should comment on whether it's safe to assume there's a module with the same name as the package.
The text was updated successfully, but these errors were encountered: