Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Dec 30, 2025

Signed-off-by: Juan Cruz Viotti [email protected]

@jviotti jviotti marked this pull request as ready for review December 30, 2025 14:03
@augmentcode
Copy link

augmentcode bot commented Dec 30, 2025

🤖 Augment PR Summary

Summary: Adds a new --include/-n mode to jsonschema compile to emit the compiled schema template as a C/C++ header (similar to xxd output).

Changes:

  • Extends CLI/docs help for compile to advertise --include/-n <name>.
  • Implements header generation in src/command_compile.cc, encoding the template JSON as "\\xNN" byte sequences with 16 bytes per line.
  • Generates a header guard keyed by the provided name, plus NAME_DATA and NAME_LENGTH symbols.
  • For C++ builds, additionally exposes a constexpr std::string_view NAME wrapper.
  • Adds Unix test cases to validate output stability, short-option support, and that the generated header compiles under both C and C++.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Signed-off-by: Juan Cruz Viotti <[email protected]>
@jviotti jviotti merged commit 0503ee9 into main Dec 30, 2025
22 of 23 checks passed
@jviotti jviotti deleted the compile-include branch December 30, 2025 15:09
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 9, 2026
⚠️ **CAUTION: this is a major update, indicating a breaking change!** ⚠️

This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | major | `v13.6.0` → `v14.0.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sourcemeta/jsonschema (sourcemeta/jsonschema)</summary>

### [`v14.0.2`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.0.2)

[Compare Source](sourcemeta/jsonschema@v14.0.1...v14.0.2)

#### What's Changed

- feat: order lint errors by line number by [@&#8203;Karan-Palan](https://github.com/Karan-Palan) in [#&#8203;599](sourcemeta/jsonschema#599)

**Full Changelog**: <sourcemeta/jsonschema@v14.0.1...v14.0.2>

### [`v14.0.1`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.0.1)

[Compare Source](sourcemeta/jsonschema@v14.0.0...v14.0.1)

#### What's Changed

- Use an array of bytes for `compile --include` by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;598](sourcemeta/jsonschema#598)

**Full Changelog**: <sourcemeta/jsonschema@v14.0.0...v14.0.1>

### [`v14.0.0`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.0.0)

[Compare Source](sourcemeta/jsonschema@v13.6.0...v14.0.0)

#### What's Changed

- Better detect unreferenced definitions in the linter by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;595](sourcemeta/jsonschema#595)
- Generate C/C++ headers in `compile` using `--include` (like `xxd`) by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;596](sourcemeta/jsonschema#596)
- Remove instance location information from the `inspect` command by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;597](sourcemeta/jsonschema#597)

**Full Changelog**: <sourcemeta/jsonschema@v13.6.0...v14.0.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4yIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1ham9yIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants