-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Improve deprecation error message #12949
Comments
The existing message is about when the feature will be removed from the code base, not when it will stop working. Once we start throwing the error (i.e., when the feature stops working), the date that we say we will remove the feature will always be the current version + one minor release... so that number will continue to increase by one until we remove the feature from the code base. In reality we will leave the deprecated feature in the code for at least 6 minor releases after we start throwing an error. |
Thanks for the clarification. However, the user probably doesn't really care when the actual code is removed, so this string is a bit confusing. Plus, as you suggested, the information isn't quite correct anyway... So, perhaps at least a better wording? |
That's debatable. Maybe we could change the ERROR message to:
|
That's one option. Though, users probably care less about when the feature was deprecated, as when they'll no longer be able to use it. (Also mentioning how long ago it was deprecated can help fend off cries of "surprise" removals, though.) Ideally INFO/WARNING messages would be used to inform the user of exactly what point (in terms of Hugo version numbers) a feature will start breaking their code. From the very first INFO message, the most important piece of information (only important information, really) from a user perspective is, If knowing when the deprecation started makes it easy to figure that out (if it's always + 12 minor versions), then great! Hugo can just do that math instead of making users figure it out, and display (As an aside, "DEPRECATED ERROR" is also a weird label — an API being "deprecated" means it's still usable, but is slated for future removal and not recommended for use. It should be avoided in new code, and migrated away from in old code. Failing with an ERROR when the API is accessed usually comes after the deprecation period has ended, and represents the transition to the next phase after deprecation — "disablement", for lack of a better word.) |
Is there a temporary work around for this error? Running |
@jamesanderson9182 Please ask your question in the forum (https://discourse.gohugo.io/). The answer will depend on the theme. Thanks. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
According to adityatelange/hugo-PaperMod#1573 (comment),
.Site.Social
is removed in v0.136.0. However, I'm getting the following error message:Note the version says 0.137.0, while the error producing release is v0.136.0. This version mismatch seems to be happening for other deprecated features I encountered in the past.
Based on the deprecation policy, it seems the string should be "...removed in Hugo 0.136.0". The following is the math:
v0.124.0
-v0.129.0
v0.130.0
-v0.135.0
v0.136.0
onwardThe text was updated successfully, but these errors were encountered: