Skip to content

feat(developer): support output folder and --continue-on-error - #16453

Merged
mcdurdin merged 2 commits into
masterfrom
feat/developer/kmc-out-dir
Sep 2, 2026
Merged

feat(developer): support output folder and --continue-on-error#16453
mcdurdin merged 2 commits into
masterfrom
feat/developer/kmc-out-dir

Conversation

@mcdurdin

@mcdurdin mcdurdin commented Aug 28, 2026

Copy link
Copy Markdown
Member

Add support for specifying an output folder instead of filename for the --out-file parameter of kmc. This allows for batch builds, which can be much faster than invoking kmc for each file separately.

Alongside that, add a --continue-on-error parameter that allows for batch builds to continue even if a single file fails to build. (Note that if a fatal error is encountered, kmc aborts with exit code 70).

Fixes: #16447

User Testing

  • TEST_FOLDER: attempt to build multiple files by specifying them on the command line with kmc build <files...> -o target_folder. Verify that the files are written into target_folder as expected.
  • TEST_FOLDER_SLASH: attempt to build multiple files by specifying them on the command line with kmc build <files...> -o target_folder/. Verify that the files are written into target_folder as expected.
  • TEST_FOLDER_FILE_IN_THE_WAY: create a file target_file. attempt to build multiple files by specifying them on the command line with kmc build <files...> -o target_file. Verify that kmc exits with an error.
  • TEST_CONTINUE_ON_ERROR: attempt to build multiple files by specifying them on the command line with kmc build <files...> --continue-on-error. At least one file should have a build error. Verify that kmc attempts to build all files (so, put the failing files before good files in the list!).
  • TEST_NO_CONTINUE_ON_ERROR: attempt to build multiple files by specifying them on the command line with kmc build <files...>. At least one file should have a build error. Verify that kmc stops on the first file with an error.

Add support for specifying an output folder instead of filename for the
`--out-file` parameter of kmc. This allows for batch builds, which can
be much faster than invoking kmc for each file separately.

Alongside that, add a `--continue-on-error` parameter that allows for
batch builds to continue even if a single file fails to build. (Note
that if a fatal error is encountered, kmc aborts with exit code 70).
@keymanapp-test-bot

keymanapp-test-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

Test Artifacts

@github-actions github-actions Bot added the feat label Aug 28, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added this to the A19S36 milestone Aug 28, 2026
@keyman-server keyman-server modified the milestones: A19S36, B19S1 Aug 30, 2026
Comment thread developer/src/kmc/src/commands/build.ts Outdated
Comment thread developer/src/kmc/src/util/baseOptions.ts Outdated
@Meng-Heng

Copy link
Copy Markdown
Contributor

@mcdurdin, the Developer Test Build is empty. Could you rebuilt this again?

Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
@mcdurdin

mcdurdin commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Could you rebuilt this again?

Running now

@Meng-Heng

Copy link
Copy Markdown
Contributor

Test Specs

  1. kmc version 19.0.276-alpha-test-16453
  2. Keyman Developer on Windows 10 Bootcamp
  3. PowerShell

Test Results

  • TEST_FOLDER (PASSED):
  1. Write kmc build ./release/e/eastern_cham/source/eastern_cham.kmn ./release/e/east_syriac_qwerty/source/east_syriac_qwerty.kmn ./release/e/eastern_pwo_karen/source/eastern_pwo_karen.kmn ./release/e/easy_arabic/source/easy_arabic.kmn -o ../test_folder
  2. VERIFIED: The files (js, kmx, kvk) are written into target_folder as expected.
  • TEST_FOLDER_SLASH (PASSED):
  1. Write the same kmn files to output in the /folder_wo_slash
  2. VERIFIED: The files (js, kmx, kvk) are written into folder_wo_slash as expected.
  • TEST_FOLDER_FILE_IN_THE_WAY (PASSED):
  1. Create target_file.txt
  2. Write: kmc build ./release/e/eastern_cham/source/eastern_cham.kmn ./release/e/east_syriac_qwerty/source/east_syriac_qwerty.kmn ./release/e/eastern_pwo_karen/source/eastern_pwo_karen.kmn ./release/e/easy_arabic/source/easy_arabic.kmn -o ../target_file.txt
  3. VERIFIED: Parameter --out-file must refer to a folder.
  • TEST_CONTINUE_ON_ERROR (PASSED):
  1. Write kmc build ./release/e/eastern_cham/source/eastern_cham.kmn ./release/e/east_syriac_qwerty/source/east_syriac_qwerty.kmn ./release/e/eastern_pwo_karen/source/eastern_karen.kmn ./release/e/easy_arabic/source/easy_arabic.kmn --continue-on-error -o ../test_folder/
  2. VERIFIED: Only the eastern_pwo_karen files are not built.
  • TEST_NO_CONTINUE_ON_ERROR (PASSED):
  1. Write kmc build ./release/e/eastern_cham/source/eastern_cham.kmn ./release/e/east_syriac_qwerty/source/east_syriac_qwerty.kmn ./release/e/eastern_pwo_karen/source/eastern_karen.kmn ./release/e/easy_arabic/source/easy_arabic.kmn -o ../target_file/
  2. VERIFIED: The eastern_pwo_karen and easy_arabic files are not built.

@keymanapp-test-bot keymanapp-test-bot Bot removed the user-test-required User tests have not been completed label Sep 2, 2026
@mcdurdin
mcdurdin merged commit 4426d4e into master Sep 2, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman Sep 2, 2026
@mcdurdin
mcdurdin deleted the feat/developer/kmc-out-dir branch September 2, 2026 08:59
@keyman-server

Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.278-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(developer): if -o parameter points to a folder, kmc crashes with an error

4 participants