TeX-Live / texdoc

Find and view documentation in TeX Live
https://tug.org/texdoc/
GNU General Public License v3.0
47 stars 8 forks source link

Data.tlpdb.lua is not reproducible #68

Closed xworld21 closed 3 years ago

xworld21 commented 3 years ago

When texdoc generates cache-tlpdb.lua, the order of the entries is not deterministic, and it changes on every run. This is essentially the same issue described in https://github.com/TeX-Live/texdoc/wiki/TODO#debug-outputs-reproducibility, but confined to print_out_tlpdb, and for packaging rather than debugging. Having a reproducible output would be helpful for packaging, if possible.

wtsnjp commented 3 years ago

Ok. Sorting debug output affects every Texdoc runs, but your suggestion affects only the runs generating the cache, which are slow anyway. It will not harm almost anything. I will work on this.

xworld21 commented 3 years ago

Thanks!

If it helps, I just wrote a small patch for myself to run some experiments. Not sure if it is good code, though. It's the first time I write in Lua.

norbusan commented 3 years ago

Looks fine to me! Thanks

wtsnjp commented 3 years ago

Oh, you already made a patch, thanks. Looks good to me as well.

Would you make a pull request so that we can see the CI results?