Open
Conversation
Contributor
Author
|
In my perfect world there would be a way to configure this at the repo level as a default setting as well, but I couldn't figure out if that matches with any of the existing config systems. Is there a decent place to discuss these things out of band? I keep seeing people mention a Discord in other issues/PRs but can't find it online anywhere 😅 |
Adds --hide-cached to the `exec` family of commands. This is used to configure the MoonReporter's behaviour for a given command run. At present the only way to configure task reporting is with the individual task's reporting settings. This change adds a new mechanism to configure the reporter behaviour from command line flags. A "clean" separation of concerns might complicate this by making a separate MoonTaskReporter that is aware of tasks, and initialize it in each of the exec-family commands. However, because the MoonReporter is aware of tasks and configured before subcommand execution, we need to read the CLI commands outside of the individual subcommands in order to initialize it before descending into subcommand execution. I'm not 100% happy with this design, but I tried plumbing overrides through TaskReportItem, and I didn't like that design because it conflated transient, global CLI config with persistent config from individual task configs. I think this is a reasonable compromise that doesn't involve rewriting the MoonReporter to be more "pure" and harder to maintain. Closes moonrepo#1930
84c1d73 to
b20ffa4
Compare
Collaborator
|
@Adjective-Object Sorry for the late reply, wanted to get v2 out. I've though about this before as well, and like you've seen, it's kind of awkward to get the settings into the right code paths. This may make more sense as a config setting so that users don't always have to pass the arg. Maybe |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds --hide-cached to the
execfamily of commands. This is used to configure the MoonReporter's behaviour for a given command run.At present the only way to configure task reporting is with the individual task's reporting settings. This change adds a new mechanism to configure the reporter behaviour from command line flags.
A "clean" separation of concerns might complicate this by making a separate MoonTaskReporter that is aware of tasks, and initialize it in each of the exec-family commands. However, because the MoonReporter is aware of tasks and configured before subcommand execution, we need to read the CLI commands outside of the individual subcommands in order to initialize it before descending into subcommand execution.
I'm not 100% happy with this design, but I tried plumbing overrides through TaskReportItem, and I didn't like that design because it conflated transient, global CLI config with persistent config from individual task configs. I think this is a reasonable compromise that doesn't involve rewriting the MoonReporter to be more "pure" and harder to maintain.
Closes #1930