Initial build system support deficiencies
Things to be fixed:
-
The API is toast, since the plugin provider needs to defer initialization, which is annoying and sad. The API should be rewritten such at __init__can expect to see all it needs to see (including configure args, build-dirs, etc., which should be provided pre-resolved - this implies running the constructor in the relevant environment). Possible feature interaction with 6.- Simplest solution is probably to have two-levels of initialization. One inside the environment with everything expanded and one outside the environment. The latter would be used by the linting but is also necessary to define the environment to be used.
- The
debputyAPI should provide a default one for the "outside" variant with a few hooks since most of it should be generic.
-
Each build re-initialize the environment from scratch, including invoking dpkg-buildflags. That is slow and we should cache this a lot better when it is the same environment (the default environment is an obvious win) - Conditional for skipping/running tests or ignoring errors from tests. Like:
-
"Never run the tests -
"Never run the tests on !linux-any" -
"Run the tests but ignore errors on !linux-any"
-
-
HOME and XDG envs are not set/unset like debhelperdoes it. -
Conditionally skip steps like Do the configure, but instead of the build then run this command instead. Combine withbeforeandaftersteps (autoconf+debhelperbuild systems want to split theirconfigurestep to haveautoreconfseparate). Problem: Environment is not known until the build system is constructed as it is.- Note: hooks in
debhelpercould apply to different package sets (for) than the step they hook into or replaced. Consider a build that apply to all packages but have different -arch/-indep overrides to build code vs. docs as a minimum supported feature.
- Note: hooks in
-
Build systems should be able to report build-dependencies required. This will require instantiating the build system (since cmake + makefilerequires different dependencies thancmake + ninjaand the build system would not know which it is until it has parsed its config). Things to consider:- Parts of the build system would have to be "LSP/lint safe" (initialization, auto detection and requirement detection). This also might feature interact with 1.
- LSP/Lint would need to parse the build system logic or the entire manifest parsing must be LSP/lint safe.
- Perl packages building XS modules to should have
perl-xs-dev(not conditional on cross-building) - CMake consumers needs
cmakeand conditionallyninja-build - Meson consumers need
meson(and arguablyninja-buildbut I think we de facto assumemesonto provide it) - The
debhelperbuild system would needdebhelper-compat (= N) | debhelper(any version). - The
qmakebuild systems would require the relevant version ofqmake.
-
Automatic destdir -> default search path is missing -
Collect automatic destdir earlier (in build-env rather than outside) -
Package selection ( for) uses list of package names. However, selections are not always by package name but ratherarch:allvs.arch:anyordebvs.udeb.
Edited by Niels Thykier