-
Notifications
You must be signed in to change notification settings - Fork 3
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
1912: Check and fix circular dependencies #1913
base: main
Are you sure you want to change the base?
Conversation
da5c3c9
to
d0ed239
Compare
1a1ce7d
to
8ba139f
Compare
f735947
to
812bc82
Compare
1802ce2
to
c130690
Compare
549f9d6
to
0ff17e3
Compare
0ff17e3
to
ad5f85b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work! Tested application on firefox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙃 Rename to check_circular_deps
(no .sh
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Is this copied from somewhere or did you write it yourself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partly copied but adjusted to our needs . I will add the source
@@ -117,7 +118,8 @@ | |||
"format": "NODE_ENV=test eslint . --fix && prettier . --write", | |||
"generate-graphql": "graphql-codegen --config graphql-codegen.yml", | |||
"generate-protobuf": "protoc -I ../specs --es_out=src/generated --es_opt=target=ts --plugin=protoc-gen-es=../node_modules/.bin/protoc-gen-es ../specs/card.proto", | |||
"postinstall": "npm run generate-protobuf && npm run generate-graphql" | |||
"postinstall": "npm run generate-protobuf && npm run generate-graphql", | |||
"check-circular-deps": "bash ./scripts/check_circular_deps.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 I think it would be better not to request bash explicitly.
"check-circular-deps": "bash ./scripts/check_circular_deps.sh" | |
"check-circular-deps": "./scripts/check_circular_deps" |
Perhaps you have to run chmod +x check_circular_deps
first though.
Short Description
To avoid circular dependencies i added
madge
to detect them.Since we got a couple of them, i provided some refactoring
Proposed Changes
add madge to detect circular dependencies
add bash script to check circular dependencies
execute bash script on
checkAdministration
in ci pipelinerefactor components and imports to solve circular dependencies (see screenshot)
add eslint config (couldn't test it yet)
TODO Refactor JsonFieldView & JsonFieldArray #1914 since this needs some more investigation
Side Effects
Testing
Note: That most of the changes are just imports and moving components in functions in separate files, so a rough code review should be sufficient
Resolved Issues
Fixes: #1912
Additional information