Improve error handling on --resolve meta-schema errors#673
Merged
Conversation
fe8db85 to
8d1158b
Compare
🤖 Augment PR SummarySummary: This PR improves user-facing error reporting when importing schemas via Changes:
Technical Notes: The new test cases validate both human-readable stderr formatting and 🤖 Was this summary useful? React with 👍 or 👎 |
8d1158b to
86941c0
Compare
See: #672 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
86941c0 to
0acd41e
Compare
There was a problem hiding this comment.
1 issue found across 6 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/resolver.h">
<violation number="1" location="src/resolver.h:215">
P2: The `catch (const sourcemeta::core::SchemaResolutionError &error)` block will also catch any derived exception types (e.g., `SchemaRelativeMetaschemaResolutionError`) due to C++ exception handling order, causing type slicing when rethrowing as `FileError<SchemaResolutionError>`. This means downstream handlers will see the base type instead of the derived type, potentially showing a misleading "forgot to import using `--resolve/-r`" hint for errors that aren't actually about missing imports. Consider adding a catch block for derived resolution error types *before* this one to preserve the specific error semantics.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 24, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | patch | `v14.13.3` → `v14.13.4` | 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.13.4`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.13.4) [Compare Source](sourcemeta/jsonschema@v14.13.3...v14.13.4) #### What's Changed - Fix bundling not de-duplicating equal schemas by [@​jviotti](https://github.com/jviotti) in [#​669](sourcemeta/jsonschema#669) - Improve error handling on `--resolve` meta-schema errors by [@​jviotti](https://github.com/jviotti) in [#​673](sourcemeta/jsonschema#673) - Respect ordering of `--resolve` arguments to avoid meta-schema ambiguity by [@​jviotti](https://github.com/jviotti) in [#​674](sourcemeta/jsonschema#674) **Full Changelog**: <sourcemeta/jsonschema@v14.13.3...v14.13.4> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, 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:eyJjcmVhdGVkSW5WZXIiOiI0My4zMS4xIiwidXBkYXRlZEluVmVyIjoiNDMuMzEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See: #672
Signed-off-by: Juan Cruz Viotti jv@jviotti.com