Conversation
218af55 to
f29d924
Compare
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
f29d924 to
3b823fa
Compare
There was a problem hiding this comment.
1 issue found across 252 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed. cubic prioritises the most important files to review.
Prompt for AI agents (unresolved 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/ir/ir.cc">
<violation number="1" location="src/ir/ir.cc:113">
P1: Skipping all descendants under `contains`/`propertyNames` can drop schemas that are still referenced via `$ref`, leading to generated aliases that reference non-emitted types.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| // Skip subschemas under validation-only keywords that do not contribute | ||
| // to the type structure (like `contains`) | ||
| if (is_validation_subschema(frame, location, walker, resolver)) { |
There was a problem hiding this comment.
P1: Skipping all descendants under contains/propertyNames can drop schemas that are still referenced via $ref, leading to generated aliases that reference non-emitted types.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/ir/ir.cc, line 113:
<comment>Skipping all descendants under `contains`/`propertyNames` can drop schemas that are still referenced via `$ref`, leading to generated aliases that reference non-emitted types.</comment>
<file context>
@@ -67,6 +108,12 @@ auto compile(const sourcemeta::core::JSON &input,
+ // Skip subschemas under validation-only keywords that do not contribute
+ // to the type structure (like `contains`)
+ if (is_validation_subschema(frame, location, walker, resolver)) {
+ continue;
+ }
</file context>
🤖 Augment PR SummarySummary: This PR upgrades the vendored Sourcemeta Core dependency and introduces Sourcemeta Blaze as a new dependency, updating Codegen’s build/packaging and IR pipeline accordingly. Changes:
Technical Notes: This upgrade notably changes the dependency graph (Core no longer provides 🤖 Was this summary useful? React with 👍 or 👎 |
| @@ -0,0 +1,11 @@ | |||
| if(NOT Blaze_FOUND) | |||
| if(CODEGEN_INSTALL) | |||
| set(SOURCEMETA_BLAZE_INSTALL ON CACHE BOOL "enable installation") | |||
There was a problem hiding this comment.
FindBlaze.cmake sets SOURCEMETA_BLAZE_INSTALL, but the vendored Blaze CMake uses BLAZE_INSTALL to gate install rules/components; this looks like CODEGEN_INSTALL may not actually control Blaze’s install behavior as intended.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| "allOf", "title", "description", "default", "deprecated", "readOnly", | ||
| "writeOnly", "examples", "unevaluatedProperties", "unevaluatedItems"}); | ||
|
|
||
| const auto &all_of{subschema.at("allOf")}; |
There was a problem hiding this comment.
handle_allof doesn’t guard against an empty allOf array; in that case it would return an IRIntersection with no branches, which then causes the TypeScript generator to emit an invalid export type X =\n; definition.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| @@ -0,0 +1,12 @@ | |||
| This software is dual-licensed: you can redistribute it and/or modify it under | |||
There was a problem hiding this comment.
This PR vendors Blaze under an AGPLv3-or-later / commercial dual license; can you confirm the intended licensing/compliance story for distributing Codegen (and any CI artifacts) with this new vendored dependency?
Severity: high
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com