fix(codegen): update references to Category class in code generation …#241
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the HR test model to reuse Category from the org.acme.hr.base@1.0.0 namespace (instead of defining a local Category concept), and refreshes expected snapshots to reflect the updated type ownership and dependency graph edges.
Changes:
- Import
Categoryfromorg.acme.hr.base@1.0.0and remove the localCategoryconcept from the HR CTO fixture. - Update graph visitor snapshots to point
pii/Inforelationships toorg.acme.hr.base@1.0.0.Category. - Update codegen snapshots across formats to remove the generated
org.acme.hr@1.0.0.Categoryartifacts and reference the baseCategoryinstead.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/common/snapshots/graph.js.snap | Updates expected dependency graph edges to reference org.acme.hr.base@1.0.0.Category. |
| test/codegen/fromcto/data/model/hr.cto | Switches Category to an imported base type and removes the local Category concept fixture. |
| test/codegen/snapshots/codegen.js.snap | Refreshes multi-format codegen expectations to reflect Category coming from the base namespace. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…and model files Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>
|
@mttrbrts Can you look into it once and approve the workflows? |
|
Approved to unblock the build. But this is an edge case that we should have a test for. Can you / @muhabdulkadir create a ticket to track? |
|
coverage: 98.237%. remained the same — apoorv7g:fix-#237 into accordproject:main |
fix(test): resolve duplicate ICategory in HR fixture models
Closes #237
Fixes TypeScript compile failures for the canonical HR integration fixtures (
hr_base.cto+hr.cto) by removing a duplicateCategoryconcept in the hr namespace. Both models previously emittedICategory, which causedtscto fail with duplicate identifier errors inconcerto@1.0.0.ts.Changes
Categoryfromorg.acme.hr.base@1.0.0inhr.ctoinstead of defining a localconcept Category {}Categorytype across both namespacesHow to Test
This shall output ->
TypeScript compile succeededAlso run Targeted tests
Flags
TypescriptVisitor; reviewers agreed the duplicate concept in the test models was the root cause after fix(*): resolve typeScript visitor imports for map types #238 fixed the map import issueScreenshots or Video
Before (tsc failure):
After: the repro script exits 0 and
npm testpasses (586 tests).Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:branchname[ shall be done from future PRs ]