-
Notifications
You must be signed in to change notification settings - Fork 5k
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
build: track circular dependency in the codebase #29811
Merged
+1,094
−360
Merged
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
1106021
build: add madge configuration for TypeScript circular dependency det…
dbrans b727bf3
feat: add circular dependency detection script
dbrans aac45a3
chore: add baseline circular dependencies
dbrans 7d6639e
ci: integrate circular dependency checks into CI pipeline
dbrans 6c2d3ba
Merge branch 'main' into djb/circular-deps-monitoring
dbrans 15d01ca
fix lint
dbrans e9fc06d
add file header comment to circular-deps.json and rename to .jsonc
dbrans 171032a
strip comments from jsonc
dbrans 0c20e95
move circular-deps.jsonc under the development folder
dbrans d2992e0
rename "fix" to "update" and move RESOLUTION_STEPS to top of file
dbrans 6a76a71
move test-circular-deps check into its own github workflow
dbrans ecec156
update .madgerc
dbrans 2c594bf
Update madge dependency to latest version
dbrans 89c7d81
fix madge imports
dbrans 9d4d779
yarn add -D @types/madge
dbrans f44e290
yarn dedupe
dbrans 0697a9b
Update LavaMoat policies
metamaskbot acd822a
addressing PR comments
dbrans 2133870
Merge remote-tracking branch 'origin/main' into djb/circular-deps-mon…
dbrans 9220391
rebuilt yarn.lock
dbrans 45cf0fb
update circular-deps.jsonc
dbrans dfa5746
add circular-deps.jsonc to security team CODEOWNERS
dbrans f0b3de1
add @dbrans to circular-deps.jsonc CODEOWNERS
dbrans 94e3d78
Update LavaMoat policies
metamaskbot 7dde616
Merge remote-tracking branch 'origin/main' into djb/circular-deps-mon…
HowardBraham bc1c8a2
Merge branch 'main' into djb/circular-deps-monitoring
HowardBraham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbrans marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"detectiveOptions": { | ||
"ts": { | ||
"skipTypeImports": true | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This isn't a great place to put this step, because
test-lint
was already the slowest job in this part of the pipeline. I would put this step in a separate job that runs on a separate machine.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.
@HowardBraham I think it should be added to
yarn lint
andyarn lint:fix
, since this really is just a lint step. Developers already runyarn lint:fix
(and oftenyarn lint
) before pushing to CI, so while it might slow the lint job in CI a small amount, it won't cause total CI failures due to developers forgetting to run ayarn lint:fix
plus an additionalcircular-lint:fix
step.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 we can do both: If we make the circular dependency fix part of
yarn lint:fix
for developers, but run the check as a separate CI job to avoid slowing down test-lint. This gives us convenient local fixes and efficient CI checks.Thoughts?
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've made these changes:
circular-deps:check
now runs as a separate CI jobcircular-deps:update
now is part ofyarn lint:fix
, which does not run on CIThere 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.
@dbrans I think you forgot to make this actually run...
main.yml
needs to call itThere 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.
Done.