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

Show filenames and line numbers in deprecation warnings #7480

Open
case opened this issue Jul 13, 2020 · 4 comments
Open

Show filenames and line numbers in deprecation warnings #7480

case opened this issue Jul 13, 2020 · 4 comments
Milestone

Comments

@case
Copy link

case commented Jul 13, 2020

Per the "Page.URL is deprecated" warnings (related to #4117), I'm wondering if you'd consider including the filename and/or line number that is triggering the warning?

I'm new to Hugo, so please forgive my ignorance here. :) I'm helping a friend with a few small tasks for his Hugo-powered site, and have checked all the .URL instances I could find by doing a global search in VS Code. All appear to be menu- and navigation-related, not Page context.

I've tried the various tips in the forum posts that discuss the Page.URL deprecation, but none have worked. I've also looked through closed Issues and PRs here, in case this has been discussed already, but I didn't find this mentioned.

A few people have asked in the forum about filenames and line numbers, to help with debugging this:

Thanks in advance for considering, and I appreciate your work on Hugo and with its community!

@case case added the Proposal label Jul 13, 2020
@bep
Copy link
Member

bep commented Jul 13, 2020

So, I agree, and this has been requested before, the problem is: I don't know how to do it in a simple way.

@b7acksec
Copy link

Maybe somebody have little ideas or plan how we can do this

@bep bep added this to the v0.75 milestone Jul 15, 2020
@bep bep changed the title Show filenames and line numbers in deprecation warnings? Show filenames and line numbers in deprecation warnings Jul 15, 2020
@bep
Copy link
Member

bep commented Jul 15, 2020

So, adding the line-numbers etc. to the WARNING is very hard. But what we could do is to add a flag called --fail-on-deprecation or something that did a panic(msg)-- that would create the proper error message, I think.

@case
Copy link
Author

case commented Jul 15, 2020

That would work for us!

@bep bep modified the milestones: v0.75, v0.76 Sep 14, 2020
@bep bep modified the milestones: v0.76, v0.77 Oct 6, 2020
@bep bep modified the milestones: v0.77, v0.78 Oct 30, 2020
@bep bep modified the milestones: v0.78, v0.83 Apr 23, 2021
@bep bep modified the milestones: v0.83, v0.84 May 3, 2021
@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
@bep bep modified the milestones: v0.129.0, v0.131.0 Jul 22, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants