Tuesday, April 12, 2022
Github shenanigans
It all started with a simple pull request to fix a bug. I have never attempted to just “merge” a pull request on Github before, but I figured, with such a simple change, why not try? Why not indeed.
Well, it broke my local repository. The commit message wasn't what I would have liked, and I felt a revision of the version number was required, which also involved updating the makefile and the Luarocks specification file. I made the mistake (I think—I don't know) of amending the merge message with a reformatted title and extra files and that was that. I was unable to push the changes back to Github.
I ended up having to reset both my local repositories and the Github repository.
Hard.
As in with the git reset --hard
nuclear option.
And hand added the patch into the code,
redid all the changes to the makefile and Luarocks specification file multiple times.
Ugly stuff.
But I got it as I like it.
And then I went to load the new version of the code into Luarocks and of course it failed.
Of course.
Github decided several months ago to depcrecate support for git:
URLs and guess what I'm using?
Sigh.
It took longer than I liked to find out I need to switch to using git+https:
URLs,
and several version bumps of several of my Lua modules to get it all straightened out.
I just cannot update the Luarocks specification files properly.
It always takes way too many tries for me to get it right.
Aaaaaah!
I'm also unsure why the Github merge failed for me. Am I not using the “proper” work flow? Is it because Github considers itself the “primary repository” when in fact, for my stuff, it isn't? I don't know. Perhaps I'm slowly becoming computer illiterate.
Update on Wednesday, April 13th, 2022
It seems the latest version of Luarocks will auto-correct
git:
URLs.
[See what you get when you don't update every 20
minutes? —Editor] [Shut up, you!
—Sean] I'm not sure what to think of this.