-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: simplify pipeline model #301
Conversation
@zowoq this is my first attempt at making it easier to configure the ordering of formatters and make it easier to handle nix-community/infra#1266 (comment) I'm keen to get your feedback. |
734bf50
to
01ab21a
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.
This is great. I tried separating concerns even further in the comments but honestly it's not needed.
This looks good, thank you! |
b003614
to
82518f6
Compare
For each path we determine the list of formatters that are interested in formatting it. From there, we sort the list of formatters first by priority (lower value, higher priority) and then by name (lexicographically). With this information we create a batch key which is based on the unique sequence of formatters. When enough paths with the same sequence is ready we apply them in order to each formatter. By default, with no special configuration, this model guarantees that a given path will only be processed by one formatter at a time. If a user wishes to influence the order in which formatters are applied they can use the priority field. Signed-off-by: Brian McGee <brian@bmcgee.ie>
82518f6
to
ce14ee8
Compare
@zimbatm did some cleanup and updated the docs. |
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 06f15f4 |
For each path we determine the list of formatters that are interested in formatting it. From there, we sort
the list of formatters first by priority (lower value, higher priority) and then by name (lexicographically).
With this information we create a batch key which is based on the unique sequence of formatters. When enough paths with the same sequence is ready we apply them in order to each formatter.
By default, with no special configuration, this model guarantees that a given path will only be processed by one formatter at a time.
If a user wishes to influence the order in which formatters are applied they can use the priority field.
TODO
Signed-off-by: Brian McGee brian@bmcgee.ie