This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
clang-tidy: added the ability to shard jobs #37265
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
20f3910
clang-tidy: added the ability to shard jobs
gaaclarke ee8469e
added test
gaaclarke 56ab558
jenn feedback
gaaclarke e458963
hack ci to run as a shard to measure the time
gaaclarke e7c58b1
tweak
gaaclarke 06a61a6
fix hack
gaaclarke e8527b3
zach feedback
gaaclarke 664deb7
zach feedback 2
gaaclarke 62a6607
removed stray async
gaaclarke d968147
moved to using sets for lookups
gaaclarke fa65733
fixed typo in docstring
gaaclarke a1438ab
Revert "fix hack"
gaaclarke 72c6a87
removed calls to map
gaaclarke 0d53794
turned the ci hack back on
gaaclarke e33c6a1
Revert "turned the ci hack back on"
gaaclarke bb2ded4
Merge remote-tracking branch 'upstream/main' into clang-tidy-shard
gaaclarke b68d266
removed sync*
gaaclarke 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
zach feedback
- Loading branch information
commit e8527b3bfcd4f2cba409697886baa255ca7b8cb3
There are no files selected for viewing
This file contains hidden or 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
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.
I think the code from here down that is reasoning about sets of commands could be made a bit more idiomatic, and maybe more readable as well, by encapsulating it in a new class (
Commands,CommandSet, orCommandShard, or something) that can live inlib/src/command.dart.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.
Respectfully, I don't think that will help make the code easier to read or maintain. The small codebase already has poor oop design already and it actually made my job harder. In objective terms adding more classes will result in more lines of code, more segmentation of the code, and more concepts you need to know to modify the code.
As an example, there is no reason for
CommandSetto exist whenSet<Command>(orList<Command>) already encapsulates the idea perfectly. People can come into the codebase and know what that is immediately, not so withCommandSet. I also can't understand from what the difference between aCommandSetand aCommandShardis.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.
The code in
getLintCommandsForFilesis not operating on theSet,List, etc. in its full generality. Instead it's doing something very specific: trying to filter unwanted items out of a big set. The specific internal data structures that are used to accomplish that goal are an implementation detail. This code would be easier to read and maintain if the the implementation details were encapsulated somehow. It doesn't necessarily have to be a class. It could be more helper methods, for example. I don't have a strong opinion there. However, I think even with comments, the code ingetLintCommandsForFilescould be improved on, and that is overall what I'm asking for.These were just naming suggestions for a single new class.
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.
Yea, I think the documentation could be better and will help with that. I've updated the docstring in
getLintCommandsForFilesand added one for_takeShard.