1
0
mirror of https://github.com/kdave/btrfs-progs synced 2025-03-25 04:16:32 +00:00

btrfs-progs: build: add configure time option to enable experimental features

Add --enable-experimental configure option that allows to merge unstable
features or partially implemented features. This is supposed to help
features that need time to settle, tweak output or formatting and would
require constant rebases and would have limited exposure to users that
could provide feedback.

If this is enabled, the following may change without notice:

- the whole feature may disappear in the future
- new command names could change or relocate to other subcommands
- parameter names
- output formatting
- json output

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2021-08-23 16:42:51 +02:00
parent 9df3619a9d
commit 6ea4830f8f
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,32 @@
Experimental features
=====================
Experimental or unstable features may be enabled by
./configure --enable-experimental
but as it says, the interface, command names, output formatting should be considered
unstable and not for production use. However testing is welcome and feedback or bugs
filed as issues.
In the code use it like:
if (EXPERIMENTAL) {
...
}
in case it does not interfere with other code or does not depend on an `#ifdef`
where it would break default build.
Or:
#if EXPERIMENTAL
...
#endif
for larger code blocks.
Each feature should be tracked in an issue with label
[experimental](https://github.com/kdave/btrfs-progs/labels/experimental), with
a description and a todo list items. Individual tasks can be tracked in other
issues if needed.

View File

@ -317,6 +317,20 @@ AS_IF([test "x$enable_python" = xyes], [PYTHON_BINDINGS=1], [PYTHON_BINDINGS=0])
AC_SUBST(PYTHON_BINDINGS)
AC_SUBST(PYTHON)
AC_ARG_ENABLE([experimental],
AS_HELP_STRING([--enable-experimental], [allow UNSTABLE and EXPERIMENTAL features]))
AS_IF([test "x$enable_experimental" = xyes], [EXPERIMENTAL=1], [EXPERIMENTAL=0])
AC_SUBST(EXPERIMENTAL)
AC_DEFINE_UNQUOTED([EXPERIMENTAL],[$EXPERIMENTAL],[Define to 1 if you experimental and unstable features are build])
experimental_msg=
if test "x$EXPERIMENTAL" = x1; then
experimental_msg="
WARNING: experimental and unstable features are enabled, do not use this
build for production and please report issues
"
fi
# udev v190 introduced the btrfs builtin and a udev rule to use it.
# Our udev rule gives us the friendly dm names but isn't required (or valid)
# on earlier releases.
@ -394,6 +408,6 @@ AC_MSG_RESULT([
Python interpreter: ${PYTHON}
crypto provider: ${cryptoprovider} ${cryptoproviderversion}
zoned device: ${enable_zoned}
${experimental_msg}
Type 'make' to compile.
])