WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.09k stars 438 forks source link

[build] Update katex submodule #1726

Closed sideshowbarker closed 4 months ago

sideshowbarker commented 4 months ago

Without this update, running the build locally in my macOS environment fails with a bunch of errors containing the message _“➤ YN0001: │ Error [ERR_STREAM_PREMATURECLOSE]: Premature close”.

rossberg commented 4 months ago

Isn't that a submodule? Looking at .gitmodules, was that even versioned?

I'm confused about the diff GH shows for this PR, which only contains the submodule directory. What actual repository file does the commit change?

sideshowbarker commented 4 months ago

This is just changing the hash that git and GitHub store for the revision of the repo for the submodule.

That hash isn’t persistently stored in any files checked into the repo, but is instead just internal metadata that’s stored locally in the .git directory after you clone and init the submodule.

Isn't that a submodule?

It is, yeah

Looking at .gitmodules, was that even versioned?

I think .gitmodules never contains version information about submodules — it instead just contains the repo URL for the repo the submodule comes from, and the local path the submodule gets cloned into.

git submodule status is what I know of to get the submodule version info. Running that in the main branch shows this:

$ git submodule status
 e751278cff42fada16dba6df331fda52aaa90f73 document/core/util/katex (v0.13.0-316-ge751278c)

…and running it in environment with the change from this PR branch shows this:

$ git submodule status
 3d5de92fb0d0511ac64901bb60b5d46c5677eb28 document/core/util/katex (v0.13.0-537-g3d5de92f)

git stores that hash/version info locally in the .git directory. But it can also be seen from the GitHub web UI at https://github.com/WebAssembly/spec/tree/main/document/core/util for the main branch — which shows katex @ e751278 — while for this PR branch, https://github.com/WebAssembly/spec/tree/sideshowbarker/katex-update/document/core/util shows katex @ 3d5de92.

I'm confused about the diff GH shows for this PR, which only contains the submodule directory. What actual repository file does the commit change?

It just changes the hash that git and GitHub store for the revision of the repo for the submodule. I don’t know where GitHub stores it. As far as I know, https://github.com/WebAssembly/spec/tree/main/document/core/util is the place in the GitHub UI where that hash is exposed/observable.

sideshowbarker commented 4 months ago

Thanks for the explanation. Obviously, I don't understand how git submodules work. :)

I can’t actually claim to understand how git submodules work either :D What I outlined in my comment above is pretty much the full extent of my knowledge on the subject…