-
Notifications
You must be signed in to change notification settings - Fork 988
Faraday::Error::ClientError deprecation warning is disruptive #1089
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
Comments
Have you considered telling the logger to skip warnings and just log errors in your CI? |
You should not treat your libraries as if they are only used by developers. Especially when it is such a big and widely used library. At the end of the dependency chain, there are users, who end up seeing useless deprecation warnings, and think that my tool is broken. Runtime is user-land, not developer-land. Never disrupt runtime. Forget the CI case, I am not sure why you picked that aspect of my issue to respond to of all problems. This is a development warning, should stay in development land. |
OK, I wasn't trying to minimise the issue, but according to your initial question it seems like I was just pointing out that If that's not the case for you, then happy to explore further how your specific use case works, but please don't assume everyone is having your same issue, otherwise we'd be seeing many more issues like this one |
Well, one of us might be missing some piece of information. I am not talking about logs, of course logs are usually considered developer-land. I am talking about STDOUT / STDERR. I was specifically exposed to this problem by using octokit. See this issue: and you can tell by the not so small amount of emojis it got stuck to it, that I am not the only one suffering from this problem. The problem was attributed to Faraday, and the solution, to downgrade Faraday until Octokit releases a new version (and here is another dude who had to do the same). Since you are talking about logs, I am now not sure if this is directly a Faraday issue, or an Octokit issue... (despite the fact that downgrading Farady solved the issue). |
Thanks for your feedback. The warnings only really matter if you're trying to upgrade your application or gem (such as Octokit) from Faraday 0.17.x to 1.0. We're going to look into making these warnings opt-in. Here's the behavior that I'm shooting for:
If someone is trying to upgrade to v1.0, you should fix all warnings reported by |
This seems to be an issue again on the jump from v1 to v2. I'm getting a bunch of these:
Did you move away from the |
@kyrofa thanks for raising this. I agree that our 1.0 -> 2.0 upgrade warning behaviour is not consistent with what we did in the past. Unfortunately, the I'll open a new issue from your comment, and get to it when I get a chance, but if someone else has some time to work on it, any help would also be appreciated 🙏 |
Displaying deprecation warnings to STDOUT/STDERR is very disruptive.
Although it is "just a warning", we need to consider that in some cases, these warnings break CI (when checking for expected output) and in other cases, displaying a warning to the end user of a CLI gem is undesirable.
It causes people who are not even using Faraday directly, to waste time on trying to find workarounds, and depend on the offending package maintainer to release an update.
I would like to suggest avoiding this practice in the future, and instead, let the magic of semantic versioning do what it was designed to do. I would even go further and suggest to release an updated version without this warning.
The text was updated successfully, but these errors were encountered: