From c299f44c24e6836b0a5a510ff5e8400b7cc77925 Mon Sep 17 00:00:00 2001 From: John Beard Date: Sat, 15 Mar 2025 19:42:49 +0800 Subject: [PATCH 1/2] developers.adoc: Add simple development loop overview This is just the minimal expected workflow for how you can build and test changes. --- developers.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/developers.adoc b/developers.adoc index 89897cd..5cab56d 100644 --- a/developers.adoc +++ b/developers.adoc @@ -52,6 +52,20 @@ several ways: ** not packaged, used as a source JS file on a website ** packaged as https://www.npmjs.com/[npm] package +=== Development loop + +The general process of making and testing a change once you have the +prerequistes and sources ready: + +* Making changes in the `compiler` repo: + * Perform a "stage build" with SBT: `sbt compilerJVM/stage` + * Use your new compiler directly: `./jvm/target/universal/stage/bin/kaitai-struct-compiler ` +* Running tests: + * Run tests from the `tests` repo + * Build the compiler if needed: `./build-compiler ` (`lang` may be something like `cpp_stl_11`) + * Regenerate compiled outputs: `./build-formats` + * Compile (if needed) and run the tests: `./run-` + === Prerequisites To build the compiler, one generally needs just these two things: From 2d433530fafcad85fdec111d92c610187f586e31 Mon Sep 17 00:00:00 2001 From: John Beard Date: Wed, 19 Mar 2025 08:27:58 +0800 Subject: [PATCH 2/2] Incorporate changes suggested by @generalmimon And fix asciidoctor list indentation >_< --- developers.adoc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/developers.adoc b/developers.adoc index 5cab56d..997c66e 100644 --- a/developers.adoc +++ b/developers.adoc @@ -58,13 +58,16 @@ The general process of making and testing a change once you have the prerequistes and sources ready: * Making changes in the `compiler` repo: - * Perform a "stage build" with SBT: `sbt compilerJVM/stage` - * Use your new compiler directly: `./jvm/target/universal/stage/bin/kaitai-struct-compiler ` -* Running tests: - * Run tests from the `tests` repo - * Build the compiler if needed: `./build-compiler ` (`lang` may be something like `cpp_stl_11`) - * Regenerate compiled outputs: `./build-formats` - * Compile (if needed) and run the tests: `./run-` +** Perform a "stage build" with SBT: `sbt compilerJVM/stage` +** Use your new compiler directly: `./jvm/target/universal/stage/bin/kaitai-struct-compiler ` +*** Adding `./jvm/target/universal/stage/bin/` to your `PATH` is helpful here +* Tests are run from the `tests` repo. After building the compiler: +** When needed (e.g. you added a test), build new tests with <>: +*** `./spec_kst_to_all [-f ] [-t lang]` +** If `.ksy` files changed, regenerate compiled outputs: +*** `./build-formats` +** Compile (if needed) and run the tests +*** `./run-` === Prerequisites