Libsqlite3-dev libncurses-dev

What do you think of including libsqlite3-dev and libncurses-dev in the Docker images?

They are necessary to import the official SwiftPM package as a dependency, because llbuild’s llbuildCore and llvmSupport link against sqlite3 and ncurses respectively.

@mishal_shah @tomerd any thoughts?

My personal view is that we should not add dependencies to the docker images we provide for Swift developers just for building specific toolchain packages like SwiftPM. If we want that, I would say it belongs in its own separate images. But I'm not an expert or a big stakeholder here.

That being said, it might be reasonable to add sqlite3-dev specifically, since it's a very common dependency. I think ncurses is pretty niche by comparison.

Yeah, it could be a separate set of images. What I’m essentially wishing for is an image with everything needed in order to use any of the official packages. (i.e. repositories in the swift- namespace which have a package manifest and one or more tagged semantic versions).

It’s not a very high priority, just something that would have come in useful from time to time.

I also doubt they are actually being used when loading a manifest (which is what I presume most clients of SwiftPM are doing; building is easier through the CLI anyway). Maybe one day package flavours or something will be able to filter out the transitive dependency so it won’t matter any more.

1 Like publishes two set of docker images:

  1. The "full" one with the full toolchain including everything you need to compile program using SwiftPM. This does not include "common dependencies" that application or libraries built with SwiftPM may need, since we need to tradeoff the size of the Docker image with the convenience. It is also a slippery slope since "common" and "useful" are in the eye of the beholder, and so the set of packages we would need to consider becomes highly subjective and a moving target as these packages evolve. As a result, the "full" packages include only what is absolutely required and nothing more.

  2. The "slim" images only include libraries that are require to run Swift programs, so does not include the toolchain at all. Given FoudnationNetworking and FoundationXML dependency on libcurl and libxml respectively, this usually boils down to these two libs, and in some cases (cento8, al2) we don't need to publish slim versions at all since the distro comes with everything we need to run a Swift program out of the box.

1 Like
Terms of Service

Privacy Policy

Cookie Policy