mutant icon indicating copy to clipboard operation
mutant copied to clipboard

Add an ability to specify path to the configuration file

Open mostlyobvious opened this issue 4 years ago • 8 comments

At the moment mutant looks for configuration file in predefined place. This is a good convention and a default.

In a repository hosting several components, each one in need of such configuration, it would require as many configuration files. With shared configuration for components that's a lot of symlinking. It would be nice to have a CLI flag to specify single, shared config file to avoid that.

mostlyobvious avatar Dec 22 '20 20:12 mostlyobvious

@pawelpacana While I support this initiative, I wounder if in rails_event_store you'll end up in actually defining a global config file, since mutant now (since v0.10.24 that was just released) has the ability to define the matcher configuration in the config file natively: https://github.com/mbj/mutant/blob/master/docs/configuration.md#matcher.

I suspect the amount of sharable config is quite small.

I wounder if in addition to having the option to define the configuration file location, we need to support multiple config files. Or config file inheritance.

mbj avatar Jan 01 '21 05:01 mbj

I wounder if in addition to having the option to define the configuration file location, we need to support multiple config files. Or config file inheritance.

The only reason I currently use config files is inability to pass coverage_criteria via flags. Everything else was fine so far with flags and I did not feel the need for any change.

With matcher in config perhaps I could transform my setup if this flags vs. config file asymmetry continues. I do not see the need for mutiple config files nor inheritance.

mostlyobvious avatar Jan 01 '21 10:01 mostlyobvious

The challenge is that the coverage_criteria will be supported per subject, and that would not fit within the CLI flags without becoming a source of headache for the user.

Curious why you do not want a project specific config file, and want to configure everything via flags?

mbj avatar Jan 01 '21 12:01 mbj

Curious why you do not want a project specific config file, and want to configure everything via flags?

Simply put — presence and sunk cost of existing tooling

mostlyobvious avatar Jan 01 '21 12:01 mostlyobvious

presence and sunk cost of existing tooling

Can you elaborate? From my perspective, RES would still use the Makefile to trigger mutant, but not have to re-implement a mutant config file format anymore.

Do I miss something?

BTW: I support making the config file location configurable anyway, this is a sibling discussion at this point.

mbj avatar Jan 01 '21 19:01 mbj

From my perspective, RES would still use the Makefile to trigger mutant, but not have to re-implement a mutant config file format anymore.

I need to evaluate that option

mostlyobvious avatar Jan 04 '21 10:01 mostlyobvious

This is no longer an issue for me, closing.

mostlyobvious avatar May 30 '22 08:05 mostlyobvious

I still think that feature should exist, so re-opening it.

mbj avatar May 30 '22 13:05 mbj