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

Circular dependencies in ecschema-metadata #7649

Open
rschili opened this issue Feb 4, 2025 · 0 comments
Open

Circular dependencies in ecschema-metadata #7649

rschili opened this issue Feb 4, 2025 · 0 comments
Labels
ecschema Issues related to the various ecschema packages

Comments

@rschili
Copy link
Contributor

rschili commented Feb 4, 2025

There are many circular dependencies in ecschema-metadata. Right now they do not seem to surface but minimal changes can make it into a problem.
For example Property.ts references concrete property implementations.

Paul introduced a fix for this in frontend 5 years back: 96878c5
That mechanism is described in this article: https://medium.com/visual-development/how-to-fix-nasty-circular-dependency-issues-once-and-for-all-in-javascript-typescript-a04c987cf0de

Another circular dependency that we have is:

ECClass -> ECProperty (getProperties, addProperty, createXXXProperty)
Property -> RelationshipClass (NavigationProperty)
RelationshipClass -> EntityClass (ConstraintClass)
EntityClass -> Mixin (getMixins)
Mixin -> ECClass (derives)

The problem surfaces at runtime, the compiler does not detect or warn about this.

@rschili rschili added the ecschema Issues related to the various ecschema packages label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecschema Issues related to the various ecschema packages
Projects
None yet
Development

No branches or pull requests

1 participant