Zulip Chat Archive

Stream: new members

Topic: lake update's widget/package-lock.json.* in ProofWidgets4?


mars0i (Dec 23 2024 at 20:45):

In a ProofWidgets4 repo, running lake update creates

widget/package-lock.json.hash
widget/package-lock.json.trace

which are not listed in .gitignore, and so git wants to know whether to commit them. Should I commit these files? (What are they, if that's an easy question to answer?)

Eric Wieser (Dec 23 2024 at 22:05):

These look like lake caching outputs, so should be ignored not committed

Eric Wieser (Dec 23 2024 at 22:05):

But @Wojciech Nawrocki may know whether they should have been created in the first place.

𝚠𝚘𝚓𝚌𝚒𝚎𝚌𝚑 𝚗𝚊𝚠𝚛𝚘𝚌𝚔𝚒 (Dec 23 2024 at 22:23):

These are indeed used by Lake for caching, but in fact they should be committed. This is because if these files are not present, the widgetPackageLock target may rebuild package-lock.json and we don't want that. It's a hack, btw, so a solution which achieves the same behavior (package-lock.json is rebuilt by Lake whenever package.json changes, but is not rebuilt otherwise) without committing these files would be a welcome PR. (But it may be very tricky: in the end, we have to store the hash of the package.json which produced the current package-lock.json somewhere).


Last updated: May 02 2025 at 03:31 UTC