Skip to content
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

Buildmutators filter removal #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexBeggs
Copy link
Contributor

  • remove the key filtering from the ScenarioLoader outside of the BuildMutators
  • update existing BuildMutators to return NOOP when key doesn't exist in config, allowing the BuildMutators to be responsible for enabling/disabling functionality. This will allow BuildMutators to work with specific Build types (ie Bazel) or all of them depending on the configuration.

@@ -212,7 +212,6 @@ public ScenarioLoader(GradleBuildConfigurationReader gradleBuildConfigurationRea
String title = scenario.hasPath(TITLE) ? scenario.getString(TITLE) : null;

List<BuildMutator> mutators = BUILD_MUTATOR_CONFIGURATORS.entrySet().stream()
.filter(entry -> scenario.hasPath(entry.getKey()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildMutators are responsible for returning BuildMutator.NOOP if they don't support this key during configuration. This centralizes the logic to the BuildMutator instead of in 2 places.

@lptr lptr added @execution internal Internal change labels Feb 8, 2021
@lptr lptr self-assigned this Feb 8, 2021
- remove the key filtering from the ScenarioLoader outside of the BuildMutators
- update existing BuildMutators to return NOOP when key doesn't exist in config, allowing the BuildMutators to be responsible for enabling/disabling functionality. This will allow BuildMutators to work with specific Build types (ie Bazel) or all of them depending on the configuration.

Signed-off-by: Alex Beggs <sunyal@gmail.com>
@AlexBeggs
Copy link
Contributor Author

@lptr any word on this?

@lptr lptr removed the @execution label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants