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

RFC: only warn once for a use of a deprecated binding #13424

Closed
wants to merge 1 commit into from

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Oct 2, 2015

RFC: only warn once for a use of a deprecated binding

@StefanKarpinski
Copy link
Member

This seems like the wrong way to do this since it makes the binding seem non-deprecated afterwards. We don't expose that information right now, but it would be incredibly useful, e.g. for tab completion. That is, don't tab complete deprecated bindings (or methods). What about just having a flag that tracks if a warning has been printed or not and only warn if both deprecated and not previously warned?

@JeffBezanson
Copy link
Member

The right way to remove deprecation warnings is to fix the uses of deprecated names. It's the easiest case; just search and replace.

@vtjnash
Copy link
Member Author

vtjnash commented Oct 2, 2015

of course that's the right way, but it's not always practical to go fix the deprecations while trying to bug hunt something else. i can see Stefan's point that if we were going to expose this information in any other way, it would be better to not clear the flag.

@StefanKarpinski
Copy link
Member

In the mean time, the flood of deprecation warnings have been causing CI logs to become enormous. Are you seriously advocating that this is an acceptable user experience, to which one says to the user "just fix it"?

@jakebolewski
Copy link
Member

If it is annoying, why not just use --depwarn=no?

@vtjnash
Copy link
Member Author

vtjnash commented Oct 2, 2015

because I still want to get some notification that there is something to look into, just not have to deal with it first. Paraphrasing, "why do the defaults have to be broken and there is an option to get sane behavior?"

@simonster
Copy link
Member

At the moment repeated binding deprecation warnings provide no additional information. Each deprecation merely tells you that somewhere, something is using a deprecated binding. If the message is going to be printed more than once per binding it should at least tell you the module where it's being used.

@quinnj
Copy link
Member

quinnj commented Oct 2, 2015

+1 to @simonster; that was certainly a pain not having locations of the binding use.

@JeffBezanson
Copy link
Member

Ok, ok, I know. We could try printingjl_filename and jl_lineno to give some idea of where the identifier is. It might not be super accurate but probably better than nothing.

@vtjnash
Copy link
Member Author

vtjnash commented Nov 16, 2015

Running with --depwarn=no seems to solve this.

@vtjnash vtjnash closed this Nov 16, 2015
@tkelman tkelman deleted the jn/quiet_bnd_deprecated branch November 17, 2015 07:30
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.

6 participants