@vassudanagunta let us handle this in this issue. I have disabled some YAML tests for now.
There are many arguments for keeping it as it is now (string keys all over).
The question is:
Do we break something? Or: Maybe we fix more than we break?
/cc @dmgawel
Roger. Just please leverage the significant time I already put into #4379. Pretty please 馃槈 .
@vassudanagunta #4379 looks like a bigger issue, and I don't have time to consider that (at least not now). Remember: I did not implement the front matter handling nor the data handling, and I don't think it's fair to ask me to dig myself into a "rabbit hole" (your words) dug by others.
But I will try to fix this particular issue. And my thoughts are this:
interface{} makes sorting random. The lexicographically sort you get with string keys have its own problems, but it is better than random.So, here is how I suggest we do this:
I suspect this will fix plenty more than it breaks. If anyone knows of any dramatic downside to the above, speak out.
I thought it was fair to ask you given that you are the current steward of Hugo's vision and evolution toward 1.0. 馃榾 And to be fair(er), I did most of the work of laying things out very clearly. All that was needed was a decision by people who know Hugo's vision and have been around long enough to know what its users expect (not me!).
And above, you did just that! You definitively answered one of the two main issues I raised #4379 with a clear vision. So thanks! 鉂わ笍
I will update the tests as well as #4379 so that when you and the other Hugo maintainers have time, you can take a look at the remaining issue (overlapping data). All that is needed is a decision, including the decision to punt, in which case just merge #4379 as-is as it codifies in tests Hugo's current behavior, guarding against unintentional changes as well as clarifying it for anyone who decides something should change.
Alright I implemented everything above in #4402 except:
Add a check for non-string keys and print a WARNING to the console.
@bep you accepted my PR before I got to it (bedtime!). Should I assume that you decided to do it or should I continue?
Most helpful comment
I thought it was fair to ask you given that you are the current steward of Hugo's vision and evolution toward 1.0. 馃榾 And to be fair(er), I did most of the work of laying things out very clearly. All that was needed was a decision by people who know Hugo's vision and have been around long enough to know what its users expect (not me!).
And above, you did just that! You definitively answered one of the two main issues I raised #4379 with a clear vision. So thanks! 鉂わ笍
I will update the tests as well as #4379 so that when you and the other Hugo maintainers have time, you can take a look at the remaining issue (overlapping data). All that is needed is a decision, including the decision to punt, in which case just merge #4379 as-is as it codifies in tests Hugo's current behavior, guarding against unintentional changes as well as clarifying it for anyone who decides something should change.