Skip to content

Commit

Permalink
build: remove --enable-experimental-features / EXPERIMENTAL_FEATURES
Browse files Browse the repository at this point in the history
Changelog-EXPERIMENTAL: Build: all experimental features are now runtime-enabled.
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Apr 27, 2023
1 parent d267aa1 commit 30802f9
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 80 deletions.
1 change: 0 additions & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export CC=${COMPILER:-gcc}
export COMPAT=${COMPAT:-1}
export TEST_CHECK_DBSTMTS=${TEST_CHECK_DBSTMTS:-0}
export DEVELOPER=${DEVELOPER:-1}
export EXPERIMENTAL_FEATURES=${EXPERIMENTAL_FEATURES:-0}
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
export PYTEST_OPTS="--maxfail=5 --suppress-no-test-exit-code ${PYTEST_OPTS}"
export PYTEST_PAR=${PYTEST_PAR:-10}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ jobs:
env:
DEVELOPER: 1
VALGRIND: 0
EXPERIMENTAL_FEATURES: 0
COMPAT: 1
steps:
- uses: actions/checkout@v2
- name: Test in FreeBSD
id: test
uses: vmactions/[email protected]
with:
envs: 'DEVELOPER VALGRIND EXPERIMENTAL_FEATURES COMPAT'
envs: 'DEVELOPER VALGRIND COMPAT'
usesh: true
prepare: |
pkg install -y \
Expand Down
62 changes: 14 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
env:
COMPAT: 1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
ASAN: 1
UBSAN: 1
VALGRIND: 0
Expand Down Expand Up @@ -137,26 +136,15 @@ jobs:
fail-fast: true
matrix:
include:
- CFG: gcc-dev1-exp1
- CFG: gcc-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
COMPILER: gcc
- CFG: gcc-dev1-exp0
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 0
COMPILER: gcc
- CFG: gcc-dev0-exp1
DEVELOPER: 0
EXPERIMENTAL_FEATURES: 1
COMPILER: gcc
- CFG: gcc-dev0-exp0
- CFG: gcc-dev0
DEVELOPER: 0
EXPERIMENTAL_FEATURES: 0
COMPILER: gcc
# While we're at it let's try to compile with clang
- CFG: clang-dev1-exp1
- CFG: clang-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
COMPILER: clang
steps:
- name: Checkout
Expand All @@ -175,7 +163,6 @@ jobs:
env:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
COMPILER: ${{ matrix.COMPILER }}
COMPAT: 1
CFG: ${{ matrix.CFG }}
Expand Down Expand Up @@ -212,56 +199,37 @@ jobs:
fail-fast: true
matrix:
include:
- NAME: gcc-dev1-exp1
CFG: gcc-dev1-exp1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
TEST_DB_PROVIDER: sqlite3
COMPILER: gcc
TEST_NETWORK: regtest
- NAME: gcc-dev1-exp0
CFG: gcc-dev1-exp0
- NAME: gcc-dev1
CFG: gcc-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 0
TEST_DB_PROVIDER: sqlite3
COMPILER: gcc
TEST_NETWORK: regtest
- NAME: gcc-dev0-exp1
CFG: gcc-dev0-exp1
DEVELOPER: 0
EXPERIMENTAL_FEATURES: 1
TEST_DB_PROVIDER: sqlite3
COMPILER: gcc
TEST_NETWORK: regtest
- NAME: gcc-dev0-exp0
CFG: gcc-dev0-exp0
- NAME: gcc-dev0
CFG: gcc-dev0
DEVELOPER: 0
EXPERIMENTAL_FEATURES: 0
TEST_DB_PROVIDER: sqlite3
COMPILER: gcc
TEST_NETWORK: regtest
# While we're at it let's try to compile with clang
- NAME: clang-dev1-exp1
CFG: clang-dev1-exp1
- NAME: clang-dev1
CFG: clang-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
TEST_DB_PROVIDER: sqlite3
COMPILER: clang
TEST_NETWORK: regtest
# And of course we want to test postgres too
- NAME: postgres
CFG: gcc-dev1-exp1
CFG: gcc-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
COMPILER: gcc
TEST_DB_PROVIDER: postgres
TEST_NETWORK: regtest
# And don't forget about elements (like cdecker did when
# reworking the CI...)
- NAME: liquid
CFG: gcc-dev1-exp1
CFG: gcc-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
COMPILER: gcc
TEST_NETWORK: liquid-regtest
TEST_DB_PROVIDER: sqlite3
Expand Down Expand Up @@ -291,7 +259,6 @@ jobs:
env:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
COMPILER: ${{ matrix.COMPILER }}
COMPAT: 1
CFG: ${{ matrix.CFG }}
Expand All @@ -314,9 +281,8 @@ jobs:
ELEMENTS_VERSION: 22.0.2
RUST_PROFILE: release # Has to match the one in the compile step
VALGRIND: 1
CFG: gcc-dev1-exp1
CFG: gcc-dev1
DEVELOPER: 1
EXPERIMENTAL_FEATURES: 1
PYTEST_OPTS: --test-group-random-seed=42
needs:
- compile
Expand Down Expand Up @@ -365,10 +331,10 @@ jobs:
- name: Download build
uses: actions/download-artifact@v3
with:
name: cln-gcc-dev1-exp1.tar.bz2
name: cln-gcc-dev1.tar.bz2

- name: Unpack build
run: tar -xvjf cln-gcc-dev1-exp1.tar.bz2
run: tar -xvjf cln-gcc-dev1.tar.bz2

- name: Test
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
env:
DEVELOPER: 1
VALGRIND: 0
EXPERIMENTAL_FEATURES: 1
COMPAT: 0
strategy:
fail-fast: true
Expand Down Expand Up @@ -42,7 +41,6 @@ jobs:
env:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
COMPILER: ${{ matrix.COMPILER }}
COMPAT: ${{ matrix.COMPAT }}
PYTEST_PAR: ${{ matrix.PYTEST_PAR }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/prototest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
-e TARGET_HOST=${{ matrix.TARGET_HOST }} \
-e VALGRIND=${{ matrix.valgrind }} \
-e DEVELOPER=1 \
-e EXPERIMENTAL_FEATURES=1 \
-e COMPAT=0 \
-e PYTEST_PAR=2 \
-e PYTEST_OPTS="--timeout=300" \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,11 @@ pyln-release-%:
cd contrib/pyln-$* && $(MAKE) prod-release

# These must both be enabled for update-mocks
ifeq ($(DEVELOPER)$(EXPERIMENTAL_FEATURES),11)
ifeq ($(DEVELOPER),1)
update-mocks: $(ALL_TEST_PROGRAMS:%=update-mocks/%.c)
else
update-mocks:
@echo Need DEVELOPER=1 and EXPERIMENTAL_FEATURES=1 to regenerate mocks >&2; exit 1
@echo Need DEVELOPER=1 to regenerate mocks >&2; exit 1
endif

$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) libccan.a ccan/ccan/cdump/tools/cdump-enumstr config.vars
Expand Down
2 changes: 0 additions & 2 deletions common/interactivetx.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,8 @@ char *process_interactivetx_updates(const tal_t *ctx,
case WIRE_PING:
case WIRE_PONG:
case WIRE_STFU:
#if EXPERIMENTAL_FEATURES
case WIRE_SPLICE:
case WIRE_SPLICE_ACK:
#endif
return tal_fmt(ctx, "Unexpected wire message %s",
tal_hex(ctx, msg));
}
Expand Down
4 changes: 0 additions & 4 deletions common/test/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
COMMON_TEST_SRC := $(wildcard common/test/run-*.c)

ifeq ($(EXPERIMENTAL_FEATURES),1)
COMMON_TEST_SRC += $(wildcard common/test/exp-run-*.c)
endif

COMMON_TEST_OBJS := $(COMMON_TEST_SRC:.c=.o)
COMMON_TEST_PROGRAMS := $(COMMON_TEST_OBJS:.o=)

Expand Down
7 changes: 0 additions & 7 deletions common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@ STRUCTEQ_DEF(ripemd160, 0, u);
#define IFDEV(dev, nondev) (nondev)
#endif

#if EXPERIMENTAL_FEATURES
/* Make sure that nondev is evaluated, and valid, but is a constant */
#define IFEXPERIMENTAL(exp, nonexp) (0 ? (nonexp) : (exp))
#else
#define IFEXPERIMENTAL(exp, nonexp) (nonexp)
#endif

/* Context which all wally allocations use (see common/setup.c) */
extern const tal_t *wally_tal_ctx;

Expand Down
6 changes: 0 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ set_defaults()
CC=${CC:-cc}
CDEBUGFLAGS=${CDEBUGFLAGS--std=gnu11 -g -fstack-protector-strong}
DEVELOPER=${DEVELOPER:-0}
EXPERIMENTAL_FEATURES=${EXPERIMENTAL_FEATURES:-0}
COMPAT=${COMPAT:-1}
STATIC=${STATIC:-0}
ASAN=${ASAN:-0}
Expand Down Expand Up @@ -196,8 +195,6 @@ usage()
echo " Prefix for make install"
usage_with_default "--enable/disable-developer" "$DEVELOPER" "enable" "disable"
echo " Developer mode, good for testing"
usage_with_default "--enable/disable-experimental-features" "$EXPERIMENTAL_FEATURES" "enable" "disable"
echo " Enable experimental features"
usage_with_default "--enable/disable-compat" "$COMPAT" "enable" "disable"
echo " Compatibility mode, good to disable to see if your software breaks"
usage_with_default "--enable/disable-valgrind" "(autodetect)"
Expand Down Expand Up @@ -258,8 +255,6 @@ for opt in "$@"; do
--prefix=*) PREFIX="${opt#--prefix=}";;
--enable-developer) DEVELOPER=1;;
--disable-developer) DEVELOPER=0;;
--enable-experimental-features) EXPERIMENTAL_FEATURES=1;;
--disable-experimental-features) EXPERIMENTAL_FEATURES=0;;
--enable-compat) COMPAT=1;;
--disable-compat) COMPAT=0;;
--enable-valgrind) VALGRIND=1;;
Expand Down Expand Up @@ -479,7 +474,6 @@ add_var POSTGRES_INCLUDE "$POSTGRES_INCLUDE"
add_var POSTGRES_LDLIBS "$POSTGRES_LDLIBS"
add_var VALGRIND "$VALGRIND"
add_var DEVELOPER "$DEVELOPER" $CONFIG_HEADER.$$
add_var EXPERIMENTAL_FEATURES "$EXPERIMENTAL_FEATURES" $CONFIG_HEADER.$$
add_var COMPAT "$COMPAT" $CONFIG_HEADER.$$
add_var PYTEST "$PYTEST"
add_var STATIC "$STATIC"
Expand Down
1 change: 0 additions & 1 deletion contrib/docker/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export CC=${COMPILER:-gcc}
export COMPAT=${COMPAT:-1}
export TEST_CHECK_DBSTMTS=${TEST_CHECK_DBSTMTS:-0}
export DEVELOPER=${DEVELOPER:-1}
export EXPERIMENTAL_FEATURES=${EXPERIMENTAL_FEATURES:-0}
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
export PYTEST_OPTS="--maxfail=5 --suppress-no-test-exit-code ${PYTEST_OPTS}"
export PYTEST_PAR=${PYTEST_PAR:-10}
Expand Down
4 changes: 0 additions & 4 deletions lightningd/lightningd.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,6 @@ static struct feature_set *default_features(const tal_t *ctx)
OPTIONAL_FEATURE(OPT_ZEROCONF),
OPTIONAL_FEATURE(OPT_CHANNEL_TYPE),
OPTIONAL_FEATURE(OPT_ROUTE_BLINDING),
#if EXPERIMENTAL_FEATURES
OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS),
OPTIONAL_FEATURE(OPT_ONION_MESSAGES),
#endif
};

for (size_t i = 0; i < ARRAY_SIZE(features); i++) {
Expand Down

0 comments on commit 30802f9

Please sign in to comment.