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

Reduce circular dependencies #6237

Closed
quincylvania opened this issue Apr 24, 2019 · 1 comment
Closed

Reduce circular dependencies #6237

quincylvania opened this issue Apr 24, 2019 · 1 comment
Assignees
Labels
chore-build Improvements to the iD build scripts / CI environment
Milestone

Comments

@quincylvania
Copy link
Collaborator

When building, a great deal of circular dependencies are listed. This is an annoyance more than anything, but we should make a point to reduce these in order to follow best practices.

@quincylvania quincylvania self-assigned this Apr 24, 2019
@bhousel bhousel added the chore-build Improvements to the iD build scripts / CI environment label Apr 24, 2019
@quincylvania quincylvania added this to the 2.15.0 milestone Apr 24, 2019
@quincylvania
Copy link
Collaborator Author

So I was able to reduce the amount considerably.

  • Importing from index files was by far the greatest issue since it would cause files to reference many unrelated files.
  • I moved validationIssue and validationIssueFix to a separate file from core/validator
  • I moved areaKeys and setAreaKeys to a separate file from core/context

The remaining circular dependencies seem legitimate and are generally import loops between modes, operations, and behaviors. I'm not sure how important it is to resolve these. For example:

Circular dependency: modules/modes/select.js -> modules/behavior/select.js -> modules/modes/select.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore-build Improvements to the iD build scripts / CI environment
Projects
None yet
Development

No branches or pull requests

2 participants