Zulip Chat Archive

Stream: mathlib4

Topic: error with references.bib I don't understand


Emily Riehl (Oct 31 2025 at 17:19):

I'm hoping someone can tell me what I did wrong when attempting to edit references.bib. Here is the error message.

Robin Arnez (Oct 31 2025 at 18:16):

I suppose it expects it to be formatted in a certain way. The error already shows you a diff so I suppose applying it would fix the issue?

Emily Riehl (Oct 31 2025 at 18:46):

Is there some automated way to use the linter generated diff? I've been trying to copy out the suggested changes by hand from the error message and it keeps complaining.

Emily Riehl (Oct 31 2025 at 18:48):

Here is the current error message, which I'm still having trouble parsing.

Bryan Gin-ge Chen (Oct 31 2025 at 19:08):

I think if you run ./scripts/lint-bib.sh from the root directory of your mathlib4 repo and then delete docs/references.bib.old before committing, it should perform precisely the changes that the linter did.

@Anne Baanen We should maybe see if we can hook this and some of the other auto-fixable style linters up to the pre-commit.ci stuff.

Bryan Gin-ge Chen (Oct 31 2025 at 19:09):

Actually, we had a bot which would do this if you commented bot fix style; I'm not sure if it still works though.

Bryan Gin-ge Chen (Oct 31 2025 at 19:09):

I'll try that out on your PR.

Bryan Gin-ge Chen (Oct 31 2025 at 19:10):

Oh no, looks like that's broken too: https://github.com/leanprover-community/mathlib4/actions/runs/18982701804/job/54218952788

Emily Riehl (Oct 31 2025 at 19:11):

Yeah, I'd love some automation with style fixes. I think maybe I've figured this out now, though it's taken me four pushes (assuming it works this time).

Julian Berman (Oct 31 2025 at 19:29):

I've offered to pitch in on pre-commit related stuff at some point, if there's renewed interest there happy to lend a hand. For pre-commit.ci, I think bibtool is annoying in the sense that it requires a full TeX installation and the runners will not have that, so I'm not sure bibtool exists as a hook runnable in pre-commit.ci's hosted version -- but it will still be usable via https://github.com/pre-commit-ci/lite-action (and of course locally)


Last updated: Dec 20 2025 at 21:32 UTC