From 3e4b5a56b0aa7e77530afd76c2f6a683e44a3d60 Mon Sep 17 00:00:00 2001 From: afiqzudinhadi Date: Tue, 23 Jun 2026 00:29:06 +0800 Subject: [PATCH] Cleanup: remove dead files from rapid iteration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete suppress_tests.h (unused, replaced by javelin_overrides/unit_test.h) - Delete patches/ dir (orphaned, sed/python used instead) - Delete empty .gitmodules (submodule removed, javelin fetched via west) - Simplify Kconfig: remove unused flags (HEAP_SIZE, USER_DICT_SIZE, ORTHOGRAPHY_CACHE, CONSOLE, TRIGGER — not wired to code yet) - Add .gitignore for __pycache__ --- .gitignore | 1 + .gitmodules | 0 Kconfig | 38 ------------------- include/zmk_javelin_steno/suppress_tests.h | 37 ------------------ .../0001-fix-constexpr-reinterpret-cast.patch | 11 ------ patches/0002-suppress-unit-tests.patch | 9 ----- 6 files changed, 1 insertion(+), 95 deletions(-) create mode 100644 .gitignore delete mode 100644 .gitmodules delete mode 100644 include/zmk_javelin_steno/suppress_tests.h delete mode 100644 patches/0001-fix-constexpr-reinterpret-cast.patch delete mode 100644 patches/0002-suppress-unit-tests.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/Kconfig b/Kconfig index 8a4be8e..70deb57 100644 --- a/Kconfig +++ b/Kconfig @@ -6,42 +6,4 @@ config ZMK_JAVELIN_STENO select CPLUSPLUS select LIB_CPLUSPLUS -config ZMK_JAVELIN_STENO_HEAP_SIZE - int "Heap size for Javelin engine (bytes)" - default 32768 - depends on ZMK_JAVELIN_STENO - -config ZMK_JAVELIN_STENO_USER_DICT - bool "Enable user dictionary (writable flash)" - default y - depends on ZMK_JAVELIN_STENO - -config ZMK_JAVELIN_STENO_USER_DICT_SIZE - int "User dictionary flash size (bytes)" - default 16384 - depends on ZMK_JAVELIN_STENO_USER_DICT - -config ZMK_JAVELIN_STENO_ORTHOGRAPHY_CACHE - bool "Enable orthography lookup cache (~32KB RAM)" - default n - depends on ZMK_JAVELIN_STENO - -config ZMK_JAVELIN_STENO_CONSOLE - bool "Enable steno console commands via USB" - default n - depends on ZMK_JAVELIN_STENO - -choice ZMK_JAVELIN_STENO_TRIGGER - prompt "Stroke trigger mode" - default ZMK_JAVELIN_STENO_TRIGGER_ALL_UP - depends on ZMK_JAVELIN_STENO - -config ZMK_JAVELIN_STENO_TRIGGER_ALL_UP - bool "All keys up (standard)" - -config ZMK_JAVELIN_STENO_TRIGGER_FIRST_UP - bool "First key up (faster, less forgiving)" - -endchoice - endmenu diff --git a/include/zmk_javelin_steno/suppress_tests.h b/include/zmk_javelin_steno/suppress_tests.h deleted file mode 100644 index 93d5457..0000000 --- a/include/zmk_javelin_steno/suppress_tests.h +++ /dev/null @@ -1,37 +0,0 @@ -// Force-included before all Javelin sources to suppress test compilation. -// Redefine TEST macros to produce no function body, avoiding compilation -// of test code that references RUN_TESTS-only APIs. - -#ifndef JAVELIN_SUPPRESS_TESTS_H -#define JAVELIN_SUPPRESS_TESTS_H - -// Override the test macros from unit_test.h. -// Original (without RUN_TESTS): -// TEST_BEGIN → namespace UnitTestNNN { static void Test() { -// TEST_END → } } -// -// Our override makes Test() an empty function, then opens a dead namespace -// that swallows the original test body code until TEST_END closes it. -// The swallowed code goes into a struct with an unused template, so it -// never gets instantiated or compiled. - -#undef TEST_BEGIN__ -#undef TEST_BEGIN_ -#undef TEST_BEGIN -#undef TEST_END - -#define TEST_BEGIN__(text, file, line) \ - namespace UnitTest##line { \ - static inline void Test() {} \ - template struct Unused { \ - static void Swallowed() { - -#define TEST_END \ - } \ - }; \ - } - -#define TEST_BEGIN_(desc, file, line) TEST_BEGIN__(desc, file, line) -#define TEST_BEGIN(desc) TEST_BEGIN_(desc, __FILE__, __LINE__) - -#endif diff --git a/patches/0001-fix-constexpr-reinterpret-cast.patch b/patches/0001-fix-constexpr-reinterpret-cast.patch deleted file mode 100644 index c1f1ce6..0000000 --- a/patches/0001-fix-constexpr-reinterpret-cast.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/dictionary/user_dictionary.h -+++ b/dictionary/user_dictionary.h -@@ -15,7 +15,7 @@ - - struct StenoUserDictionaryData { - StenoUserDictionaryData() = default; -- constexpr StenoUserDictionaryData(const uint8_t *mem, size_t size) { -+ StenoUserDictionaryData(const uint8_t *mem, size_t size) { - assert((size & (size - 1)) == 0); - hashTable = (uint32_t *)mem; - reverseHashTable = (const uint32_t *)(mem + size / 8); diff --git a/patches/0002-suppress-unit-tests.patch b/patches/0002-suppress-unit-tests.patch deleted file mode 100644 index 175b40f..0000000 --- a/patches/0002-suppress-unit-tests.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/unit_test.h -+++ b/unit_test.h -@@ -58,7 +58,7 @@ - #define TEST_BEGIN__(text, file, line) \ - namespace UnitTest##line { \ -- static void Test() { -+ template static void Test() { - - #define TEST_END \