Local build process and instructions
bahmanm opened this issue Β· comments
Bear w/ me please as I haven't coded in CL for ages.
I wanted to try out Multiposter main earlier today.
The version in the quicklisp dist seemed, to my eyes, older than main.
So I decided to manually load the system in quicklisp and build a binary. But I had no clue as to how π
After a dozen of trials and my memory failing me, I luckily found the github actions folder and used the commands to get what I needed1.
This got me thinking, would it make sense to somehow "streamline" the process for non-Lisp-savvy folks like me:
-
Write a
Makefile
which allows the process to be as easy asmake
ormake bin
. We could use the same commands for github actions as well. -
Add instructions to the README (BTW would it make sense to switch to Markdown or orgmode for README?)
Let me know if that makes sense and I can whip a PR up.
Unfortunately the process failed as below but I'll follow up on that in another ticket.
COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "humbler" "toolkit">
[Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]
Quicklisp is out of date at the moment. This happens every time a new library is published and there isn't really anything I can do about that. Duplicating information on which dependencies to clone from where when and how is just a waste of space and introduces more failure points.
And no, I am not switching to markdown for my readmes.
There's an AUR package for it now: https://aur.archlinux.org/packages/multiposter
I would further test it and would (help) build and publish RPM/DEB packages. But not in the absence of a classic Makefile
π π€·ββοΈ
the pkgbuild is trivial to understand, mate, c'mon.
The PKGBUILD file contains the exact copy of the information in github actions. That's already 2 places and this is, hopefully, just the beginning π
W/ a Makefile
you can write the build/packaging instructions in one place and modify github actions and the AUR package to simply call make
ormake install
w/o the need to know about how the software is built/packaged using ASDF π
That's why, given Multiposter is happily gaining attraction, it's an anti-pattern to keep going w/o a Makefile
IMHO.
Your call indeed π
The PKGBUILD file contains the exact copy of the information in github actions.
It does not, though.
That's already 2 places and this is, hopefully, just the beginning π
That's a separate repository, though, with separate build and packaging needs.
Packaging upstream software for a distro is essentially always the same:
- Clone the upstream.
- Install whatever OS dependencies it needs.
- Use the build facilities provided by the upstream package to build the binaries/libraries.
3.1.Makefile
and Make
3.2.pom.xml
and Maven,
3.3.CMakeLists.txt
and CMake
3.4. ... - During (3), 99% of the time, you'd totally ignore how the upstream is built: the intricacies of the build system (ie ASDF), the upstream package manager (ie QuickLisp). The only thing you'd care about are a bunch of binaries or library archives.
- Package the generated binaries/libraries into a dowstream package.
- Ship it π’
You notice that the build()
stage in the PKGBUILD contains the same instructions as github actions. Instead they both should have been replaced by a simple make build
(possibly followed by a make PREFIX=/foo/bar install
.
I don't wish to be fretting over this more than it deserves β
It is not a big deal after all. And more importantly we've got a nice piece of software here which should be the main focus πͺ
It's just that my obsessions (and other disorders) don't let me let go of this nitpicking π
Talk is cheap, show me the code!
As I said earlier, I could whip up a PR pretty quickly w/ a Makefile to better demonstrate what I mean, in case you become interested in the future βοΈ
I really hate Makefiles, and especially Makefiles in Lisp projects. For most people using this once it ends up in QL building it is just (asdf:make :multiposter)
, and that's how it should be. There's no need for extraneous external machinery.
If you're packaging for a distro or building for CI, then you have other requirements for juggling the environment purity anyway, and the makefile would not be apt, or would again end up being too trivial to bother with.