I’m not as strong a Go developer as you, and you’ve made previous comments about the maintainability of tests in regards to pull #4796 github . com/gohugoio/hugo/pull/4796, so I recognize that you want things to be easy to maintain, but they do need to be easy to use. That’s been a point in the documentation to mention that it’s magic, and while that’s true, it’s also a bit unwieldy to find what went wrong.
It looks like we use a depreciation function in general.go github . com/gohugoio/hugo/blob/master/helpers/general.go#L327 , and lots of autogenerated wrapper functions to warn about different key types not in use in page_wrappers.autogen.go github . com/gohugoio/hugo/blob/master/resources/page/page_wrappers.autogen.go, and a generator (for those?) in generate_page_wrappers.go github . com/gohugoio/hugo/blob/master/resources/page/page_generate/generate_page_wrappers.go#L136.
Why does all this code feel like it’s a django ORM that can simply be /generated/ to have that warning built in?
I can’t put my finger on where that’s happening, and if I could, I’d have suggested it.
maybe the function is too far along to retrace who owns it, or you weren’t after object inheritance, or the result object can’t contain that warning when it spits out the file at the end…
either from the helper that warns of such depreciation (by being passed that value, changing the signature if it doesn’t have it, becoming annoying for your tests)
or from the return of the function after it’s generated the file, maybe they’re batched, so even that can’t happen.
or, more likely, it’s something to do with the autogenerated code being really annoying to deal with ;-;
I recognize you have a very busy life and it’s super cool how you’ve built it, features like these would be very, very helpful.
and I can’t find how the heck one’d fix it, because the codebase just feels unintuitive (or I’d have patched it in my own instance, had hugo with debug lines, and gone home --I can’t write a thing as cool as hugo from scratch).
link limits for new discord users…