Repository navigation
refactor(concerto-analysis): rename declaration comparer - #1571
sadSanta-07 wants to merge 2 commits into
Conversation
…p with DateTime values Signed-off-by: pechkas <iffcogc34@gmail.com>
Signed-off-by: pechkas <iffcogc34@gmail.com>
1cffbc3 to
8618168
Compare
|
Thanks for the PR, @sadSanta-07. Renaming the comparer file and its exports to match what it now covers (resolving the old One thing to check: the diff also includes changes to The Concerto maintainers have been asked to review. We aim to give a first review within a few working days, though I can't promise a date. Drafted by an Accord Project agent, reviewed by a maintainer. |
There was a problem hiding this comment.
Thank you for picking this up, and for explaining on #1152 why you kept the report keys unchanged. The rename in concerto-analysis itself is clean: the factories are renamed consistently, index.ts is the only importer, and the report keys are untouched, so there is no change for consumers.
The thing to fix before this can merge is scope. The PR also changes packages/concerto-core/src/serializer/jsongenerator.ts and its test, which looks like the map-value serialisation change from #1547 plus some whitespace reformatting. On top of that, the branch is currently conflicting with main. Rebasing and dropping the concerto-core changes should resolve both, and leave a small, easy-to-review rename that touches only packages/concerto-analysis. After that, a maintainer's approval and a green CI run are what remain.
Nothing blocking; some suggestions below. Findings: 1 should-fix, 2 nit.
- nit · conventions ·
packages/concerto-analysis/src/comparers/declaration.ts: The sibling files in this folder are plural (map-declarations.ts,scalar-declarations.ts,model-files.ts), and #1152 proposeddeclarations.ts. You mentioned on the issue that you're happy to change it, so considerdeclarations.tsfor consistency, unless a maintainer prefers the wording of the TODO. The new file also ends without a trailing newline, which the original had, so please add one. - nit · hygiene: #1152 asked for the add/remove/type-change comparers to cover map, scalar and enum declarations. Your reasoning, that
compareClassDeclarationalready receivesgetAllDeclarations()so registering them again would duplicate reports, is sound, but it narrows the scope and a maintainer hasn't confirmed it on the issue yet. The open PR #1498 also touches map and scalar comparison in the same package. It would help to have a maintainer confirm the direction on #1152 before this merges.
Automated review by Mira, an Accord Project agent, at 8618168. Findings are labelled blocking, should-fix or nit; a maintainer makes the final call.
|
|
||
| // don't serialize System Properties, other than $class | ||
| if(ModelUtil.isSystemProperty(key)) { | ||
| if (ModelUtil.isSystemProperty(key)) { |
There was a problem hiding this comment.
should-fix · correctness
This PR is a rename in concerto-analysis, but it also changes map-value serialisation here, plus whitespace-only edits in this file and its test. Those changes come from #1547. In this branch visitMapDeclaration no longer has the if (mapDeclaration.getValue().isRelationship()) { value = this.processRelationship(...) } branch that main has. If this file is taken as it stands, or the current conflict is resolved in the PR's favour, relationship handling for map values would silently be lost. Mixing the changes in also means the rename can't be reviewed as a no-behaviour-change refactor. Suggested fix: rebase on main and remove every change under packages/concerto-core, so the PR only touches packages/concerto-analysis. The DateTime-in-map fix can go through #1547.
|
This PR is stale because it has been open with no activity. Remove the stale label or comment to keep it active. Only items with maintainer engagement are auto-closed. |
fixes #1152
Summary
class-declarations.tstodeclaration.tsdeclarationAdded,declarationRemoved, anddeclarationTypeChangedContext
The existing comparison flow already passes
getAllDeclarations()tocompareClassDeclarations(), so map and scalar declarations are handled by the generic declaration comparer for additions, removals, and type changes.Map- and scalar-specific comparers remain responsible for their type-specific changes. Adding the declaration add/remove comparers to those specialized hooks would duplicate the existing findings.
This PR therefore only resolves the TODO by generalizing the comparer naming without changing comparison behavior.
The file was renamed to
declaration.tsto match the TODO text.