-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Indetermistic output for blog pages related to tags #274
Comments
So, I found the culprit, post tags are indeed loosing their ordering, so the postcard2 template produces a different ordering of the tags for each rendering of the page. In my case, I have 3 tags specified, but 2 of them switch over easily in that it seems. The use of ordered-set would resolve that, but I can see how you would hate adding a dependency. I have a fallback in Nuitka, which does do a ordered set too, that I used to test this.
|
Obviously with I cannot tell other consequences of having post On my side, until this is released, I think I can monkey patch |
Thanks for the report! How would you want it ordered or would you just want the tags to not change order for each build? We should be able to order the output (hopefully sort would be enough) before it's passed to the templates. That would avoid the need for adding orderedset? |
I think it might be natural to expose the order of the tags provided by the user. That is what My complaint is mainly with the HTML output being different for each build and in a sense an uncontrollable ordering happening, anything removing that is an improvement. Asking the user how to sort the different attributes on a config level, might be too much effort, and totally not worth it. It seems natural to order in the page source. |
In that case, maybe if I can add something like I will look into this hopefully soon(TM). |
I didn't dare change the type away from |
Describe the bug
I am trying to revert to an approach where I compare the output created by sphinx for changes I do not want. I have had some disasters strike in terms on unnoticed bad changes already a couple of times. I used to diff outputs when I was using nikola, but I gave up, because of many issues.
With sphinx my current config builds stable, except for ablog. And I have a lot of changes related to tags. This is a diff I am getting when I rebuild from scratch 2 times in a row. It never builds the same. I did not try to disable Python hash randomization, it might be a bandaid, but of course only so much
I get many of these changes, the blog pages and its RSS feed are of course of very large importance to my site.
I am willing to hunt this down on my own. I am using sphinx-build 7.2.6 and ablog==0.11.6 believing these to be fairly recent.
There is a devcontainer that automatically builds on install for my web site: https://github.com/Nuitka/Nuitka-website
I am suspecting, that a
set
object is being used. Since I am on Python3.10 there, dictionaries are no longer unordered really, but this could also be unordered usage of a file system result, I couldn't tell yet.I am using pipenv to install. I am sure I have seen it on 3.9 in my WSL too, during a migration from Debian 3.9 WSL2 pipenv config of old to new 3.10 based one for use in devcontainers.
I will be looking at your templates and what data is used to produce the archive (and I think other ablog pages are affected too), to see how unsorted it is.
To Reproduce
No response
Screenshots
No response
System Details
Installation method
pip
The text was updated successfully, but these errors were encountered: