aardappel / lobster

The Lobster Programming Language

Home Page:http://strlen.com/lobster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use system packages?

fgaz opened this issue · comments

Hi,

I maintain the NixOS package for lobster, and I noticed there are some vendored packages in dev/external. This causes longer build times, and makes it difficult to keep them updated with the latest security patches, so it'd be nice to have a way to link to system libraries instead!

That is not very practical for me. Lobster is a cross-platform code base (6 platforms: win/mac/linux/ios/android/wasm), and it is super important that dependencies are well tested against the current code, and then pinned (we can't afford to be using different versions on different platforms).

Some of our largest dependencies, like SDL, sometimes subtly break in terms of graphics, audio or input functionality, which is hard to test for with automated testing, especially on 6 very different platforms. Some of our platforms, like iOS, are currently not tested at all, and rely on "I hope it works because the same code works well on other platforms".

Hence why having a pinned version is important, which can be achieved by the current system of copying, or git submodule (which I intend to move to at some point). Allowing one of the 6 platforms (Linux) to be using the system package manager would not be helping our situation, since it would typically not be the same version.

Generally, this being a one-person side project, anything that complicates development for me is a no-no, unless it can be fully automated by CI or whatever.

Lobster doesn't take long to build though, even including all external stuff, compared to most software I know. It takes care to have few dependencies and is itself pretty small. On my local machine (ubuntu 20, clang 10, 16 cores), a clean build including all dependencies takes 16 seconds. It takes longer on CI, but that is all heavily virtualized so the exact speed will vary day to day.

The only way I could see to reduce build times is to simply re-use the binaries from https://github.com/aardappel/lobster/actions, there are 2 Linux binaries on there for almost every commit, one produced by gcc and the other for clang.

What would be nicest if build bots were smart enough to be able to cache results from git submodule CMake sub-project builds, since they hardy ever change. Maybe thru a CMake specific package manager, like vcpkg. But having that work well cross-platform is a while off.. C++ development is still in the stone ages.