duckdb / community-extensions

https://community-extensions.duckdb.org
111 stars 19 forks source link

Prevent blocking people with toolchain issues #73

Closed samansmink closed 2 weeks ago

samansmink commented 1 month ago

Currently to publish a community extension, developers are blocked by being forced to use the toolchain from https://github.com/duckdb/extension-ci-tools. We have added some optional build dependencies, and you can use vcpkg, but inevitably this is still blocking some extensions that require other build time dependencies.

To fully resolve this issue we should have a path where people have full control over the toolchain (potentially at the risk of breaking extensions, but this is at their own risk of course).

Currently we support

To resolve this issue we need to support:

Potentially in the future we can look into adding:

carlopi commented 1 month ago

Two things that came to my mind while reading this:

JAicewizard commented 3 weeks ago

aren't fully customisable toolchains already available (sort of) by allowing arbitrary CMake files? Those can already install packages / build time dependencies, arguably with a not super portable syntax. Unsure where this leads, but I'd say we already allow quite some flexibility on what's available at build time. Would that solve, at least partially, the problem?

Does this work with vcpkg? I have some vcpkg ports that require system dependencies, (omp and fortran specifically) and I think vcpkg runs before the extension cmake script.

JAicewizard commented 3 weeks ago

To add, personally I think that having a generic custom extension step, in which all kinds of things can be done (install dependencies, patch some things up, whatever) somewhere in the middle might be a way to allow extensions to have practically all the freedom they need without adding a gazillion options to the workflow. This could just be a .sh/.bat passed in to the workflow as an option. I think it would cover most cases, and I think that the user would have to be malicious in order to do break reproducibility and/or incompatibility.

samansmink commented 2 weeks ago

@JAicewizard I've implemented your suggestion, see the extension template (quack extension) in this repo for an example