Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aliasing): added new resolvedName property to typeIdentifier object for import aliased declrations #36

Merged

Conversation

sanketshevkar
Copy link
Member

@sanketshevkar sanketshevkar commented Jan 16, 2025

PartialyCloses accordproject/concerto#972

Added to new optionalresolvedName property to TypeIdenifier. This is to preserve the aliased name property which will have the local name for the aliased type. resolvedName will contain the origonal type name. It will get added only for the declrations ot types that "imported and aliased".

With the current implementation the value of the name property is different for a normal ast (local name) vs a resolved ast (original type name). This can be very confusing.

The part that would close this issue would be adding unit tests to cover the edge cases in concerto packages.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

…ct for import aliased declrations

Signed-off-by: sanketshevkar <[email protected]>
@coveralls
Copy link

coveralls commented Jan 16, 2025

Pull Request Test Coverage Report for Build 12807110955

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 96.104%

Totals Coverage Status
Change from base Build 12138117157: 0.3%
Covered Lines: 90
Relevant Lines: 90

💛 - Coveralls

@ekarademir
Copy link
Contributor

ekarademir commented Jan 16, 2025

If you use closes in the description, github will go ahead and close the issue after the PR is merged. So could you not use closes in the title or description? Unless this PR will close the issue.

…ct for import aliased declrations

Signed-off-by: sanketshevkar <[email protected]>
});
} else {
(modelFile.declarations || []).forEach((decl) => {
// What is this used for?
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add a comment here? This comment doesn't explain the code or notify anything. Maybe just add a comment to the PR? Or raise it in Discord?

Could you remove it before you merge this?

Copy link
Contributor

Choose a reason for hiding this comment

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

The code is adding types defined in the current CTO to the types table.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I had forgot to remove the comment from the older PR.

lib/metamodelutil.js Show resolved Hide resolved
@sanketshevkar
Copy link
Member Author

@ekarademir I thought it works only if the issues are logged in same repo as the PR. I'm not sure though. I'll make an update in either case.

Also I've fixed the coverage drop by fixing the aliasing test.

@sanketshevkar sanketshevkar merged commit 9a02b5b into accordproject:main Jan 16, 2025
9 checks passed
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.

4 participants