snitch-org / snitch

Lightweight C++20 testing framework.
Boost Software License 1.0
266 stars 10 forks source link

Snitch missing from meson WrapDB #156

Open vid512 opened 7 months ago

vid512 commented 7 months ago

According to the docs, snitch should be available in Meson WrapDB, but that doesn't seem to be the case.

The 'meson wrap install snitch' command says 'ERROR: Wrap snitch not found in wrapdb'.

Also I don't see 'snitch' in the list of packages: https://mesonbuild.com/Wrapdb-projects.html

cschreib commented 7 months ago

@willwray contributed the meson build scripts and the WrapDB integration. Perhaps he knows why snitch isn't listed there anymore?

willwray commented 7 months ago

Yes, I wrote that doc...

It surely should be possible now. I'll aim to have another go today and report back.

I'd intended to get the submission working and accepted quickly and imagined that wouldn't be too hard. IIRC the way WrapDB worked made things harder than expected. There was an irritating chicken-and-egg situation involving a temporary patch file, waiting for a next release and then file conflicts.

Things may have changed.

WrapDB was (is?) mostly used for libraries that need 'wrapping', i.e. libraries with foreign builds that then include a patch file to add meson build. The meson build setup added to snitch eliminates the need for a 'wrap' patch file; here WrapDB is simply for distribution of a library with native meson build.

WrapDB had a policy of only working from file-archive releases, despite that meson wrap itself is happy to work from github. The reason given was security, in case users lazily pulled from random github project HEADs. IIRC the patch file I added collided with the file archive unpack so couldn't pass WrapDB CI.

Lesson; don't write wishful docs. Write what is, fix it, then write was is new.

cschreib commented 7 months ago

Ahah, there was much more story there than I expected!

What should we do, then? Is inclusion in WrapDB not needed anymore because we have native Meson support, hence the docs should be updated to not mention it? Or do we still want to be listed there and make the current docs true?

vid512 commented 3 months ago

The wrapDB is also useful as a packaging system for people building with meson, not just for packages that require patch.

See: https://mesonbuild.com/Adding-new-projects-to-wrapdb.html

Wraps with Meson build definition patches work in much the same way as Debian: we take the unaltered upstream source package and add a new build system to it as a patch. These build systems are stored as a subdirectory of subprojects/packagefiles/. They only contain build definition files. You may also think of them as an overlay to upstream source. Wraps without Meson build definition patches only contain the wrap metadata describing how to fetch the project

In my opinion, having snitch available in this way would make it better accessible and easier to set up for meson users (as described in the wishful docs). But of course, it depends first on whether someone is willing to create (and maintain?) the wrap file.

cschreib commented 3 months ago

That sounds sensible, yes. Not using Meson myself, I have little motivation to maintain this, but our door is wide open for contributions ;)