-
Notifications
You must be signed in to change notification settings - Fork 72
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
Create reproducible needs.json - remove build timestamp information #965
Comments
That's an interesting use case and thanks for the proposed solution with I'm struggling currently between a new needs config option (I know, another one....) and maybe an extra builder, which removes timestamps. Using I will discuss the different approaches with some users. But for sure in the end, there will be a solution. |
@danwos any update descsion on this? I have no strong feelings either way 😄 |
I would add a new Sphinx-Needs option, maybe just named |
Thanks for tackling this! I agree needs_reproducible_json is a good name. Do you also sort needs in the needs.json? -> just saw it, yes, they're sorted by dictionary keys. Or, put differently - is there any chance that the result of a build of the same input could result in different needs.json files, depending on the order of documents read? (thinking about https://reproducible-builds.org/docs/stable-inputs/ ) |
Yep you beat me to it: the sphinx-needs/sphinx_needs/needsfile.py Line 103 in f3725a0
backlinks are not output in the JSON: sphinx-needs/sphinx_needs/needsfile.py Line 70 in 40856b2
links are not sorted as far as I can see |
Okay, but links appear in the order the author has given and that cannot change depending on the order of parallel reads, so I guess it's okay. |
Yep let me know if you think of anything else non-reproducible, but for now I think we are good |
The needs builder does not create reproducible builds.
It should, to avoid issues with build caching systems.
Suggested change:
Remove the "created" entry, which contains a build timestamp, from needs.json altogether.
Alternative change:
sphinx HTML build become reproducible when the document does not contain any build time related information (like
Page generated: |today|
or a footer containing the build time formatted according tohtml_last_updated_fmt
).You could add the
created
entry to a needs.json only ofhtml_last_updated_fmt
is set to None. It being set toNone
is a good indicator that the author of the sphinx project cares for a reproducible documentation build.You could also just add another
needs_
option, which would make this more explicit. But it's a niche feature, and you already have a very long configuration page and I doubt that there is a person on this planet (except @danwos maybe 😆 ) who remembers all of them.The text was updated successfully, but these errors were encountered: