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

Ensure --depwarn=yes by default in Pkg.test #1763

Merged
merged 2 commits into from
Apr 10, 2020
Merged

Conversation

c42f
Copy link
Member

@c42f c42f commented Apr 10, 2020

If JuliaLang/julia#35362 is merged, adding --depwarn=yes by default will be important for continuity. See @tkf's comment JuliaLang/julia#35362 (comment) for more detail.

(Even without merging that PR in Base, merging this PR should be harmless: it's currently the default in Julia and users can still disable it with julia_args.)

Copy link
Member

@tkf tkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c42f Thanks a lot for doing this! I've been wondering if I should create this PR.

@@ -1282,6 +1282,7 @@ function gen_test_code(testfile::String;
--color=$(Base.have_color === nothing ? "auto" : Base.have_color ? "yes" : "no")
--compiled-modules=$(Bool(Base.JLOptions().use_compiled_modules) ? "yes" : "no")
--check-bounds=yes
--depwarn=yes
Copy link
Member

@tkf tkf Apr 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes Pkg.test not to propagate --depwarn=error. So I think we need to look at JLOptions() and try not to "downgrade" depwarn setting.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yes, on balance I think that's probably the most consistent with the other options. I added a tweak.

@@ -1282,6 +1282,7 @@ function gen_test_code(testfile::String;
--color=$(Base.have_color === nothing ? "auto" : Base.have_color ? "yes" : "no")
--compiled-modules=$(Bool(Base.JLOptions().use_compiled_modules) ? "yes" : "no")
--check-bounds=yes
--depwarn=$(Base.JLOptions().depwarn == 2 ? "error" : "yes")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I have started Julia explicitly with --depwarn=no it would be nice to propagate that too, but maybe that info is not available as for other options?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like it is available. Guess you need to just pass it explicitly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep there's not much we can do about this without considerably complicating Base.JLOptions() with the ability to distinguish between default vs explicitly specified options.

@kimikage
Copy link

Does this work in the default script of Travis CI? The Base.JLOptions() in "runtests.jl" says depwarn = 0.

@KristofferC
Copy link
Member

JuliaLang/julia#35584 needs to be merged first

@kimikage
Copy link

kimikage commented Apr 24, 2020

Oh, I see. I had no doubt in my mind that this was already merged to JuliaLang/julia.

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

Successfully merging this pull request may close these issues.

5 participants