Skip to content

Remove obsolete mjb_error - #57

Merged
zaerl merged 2 commits into
mainfrom
fix/remove-obsolete-error
Jul 29, 2026
Merged

Remove obsolete mjb_error#57
zaerl merged 2 commits into
mainfrom
fix/remove-obsolete-error

Conversation

@zaerl

@zaerl zaerl commented Jul 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

Signed-off-by: Francesco Bigiarini <francesco.bigiarini@gmail.com>
@zaerl
zaerl requested a review from Copilot July 29, 2026 15:52
@zaerl zaerl self-assigned this Jul 29, 2026
@zaerl zaerl added the enhancement New feature or request label Jul 29, 2026
Signed-off-by: Francesco Bigiarini <francesco.bigiarini@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the now-obsolete mjb_error type from Mojibake’s public surface area and simplifies mjb_locale_parse to report failures solely via mjb_status, updating all affected generators, bindings, docs, and tests accordingly.

Changes:

  • Remove the public mjb_error enum and drop the mjb_error *error out-parameter from mjb_locale_parse.
  • Update the C implementation to propagate mjb_status from the internal ASCII parser (including MJB_STATUS_NO_MEMORY).
  • Update CLI, fuzz harness, C++ wrapper, WASM/TypeScript bindings, tests, and API docs to match the new signature.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
utils/generate/html-function.ts Removes obsolete generator handling for mjb_error * parameters.
utils/generate/functions.ts Updates generated function metadata/docs/examples for the new mjb_locale_parse signature.
tests/mojibake.c Adds a regression test for mjb_locale_parse allocation failure reporting (MJB_STATUS_NO_MEMORY).
tests/locales.c Updates locale parsing tests to use the new signature and remove mjb_error assertions.
tests/ext/cpp/locales.cpp Updates C++ wrapper tests to assert status-only behavior.
tests/example.c Updates generated API coverage example to use the new signature.
src/shell/commands/locale.c Updates CLI locale command to call the new mjb_locale_parse signature.
src/mojibake.h Removes mjb_error from the public header and updates the mjb_locale_parse declaration.
src/locales.c Changes the internal locale ASCII parser to return mjb_status and propagates it from mjb_locale_parse.
src/cpp/mojibake.hpp Removes LocaleError’s stored parse-error detail and updates wrapper call sites.
src/api/mojibake.d.ts Updates the WASM module typing for _mjb_locale_parse to drop the error pointer.
src/api/index.ts Removes the TS ErrorType enum and updates localeParse to drop error allocations/params.
fuzz/fuzz.c Updates fuzz locale parsing invocation to the new signature.
API.md Updates public API documentation and examples for the new mjb_locale_parse signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mojibake.h
@zaerl
zaerl merged commit 733f700 into main Jul 29, 2026
31 checks passed
@zaerl
zaerl deleted the fix/remove-obsolete-error branch July 29, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants