knigge
knigge copied to clipboard
Proposal: Searching for implementations with keys
Hi, Sascha
my suggestion would be to extend the config_key
option so that a list is also accepted.
That would be usefull for behaviour
s with additional configurations.
Example:
config :my_app, :sys,
module: MyApp.Sys.Impl
timeout: 2_000
defmodule MyApp.Sys do
use Knigge,
otp_app: :my_app,
config_key: [:sys, :module]
...
end
What do you think?
Kind regards, Marcus
p.s. Nice work and I love the name of the lib.
Coverage increased (+0.8%) to 95.652% when pulling 66a7cfbfa46154aa22240b79bc1b8ddd66da8542 on hrzndhrn:proposal/config_key into e0886d345c7ee9af5be716a33b78d4f358cc999b on sascha-wolf:main.
Hey @sascha-wolf what do you think is needed to merge this? I'm available to help if needed. Could really use this feature =)
Hi, Sascha
I have made some more changes and incorporated your change requests.
I have also updated the deps
and the ci.yml
.
Because use Mix.Config
is deprecated I have changed it to import Config
. This causes the failing tests for Elixir versions smaller as 1.9.0
.
Let me know if the PR is too big and how we want handle the failing tests.
Have a nice day.
Hey @NickNeck, I've to say the PR currently intimidates me. I'm also not sure why you updated the ci.yml
flow?
If you think the project can derive value from the changes to ci.yml
and config/
then let's extract them to a different PR so we can keep the focus on the originally proposed changes. Otherwise I don't feel comfortable approving and merging this.
I just update the ci.yml
to test against the latest versions. I used my little git_hub_actions
tool to make things simpler for me. I will make a separate PR and then you can take look if it is okay for you.
Hello @NickNeck and @sascha-wolf! Would you be so kind as to bring this PR to a release?
Now I fetch an implementation module from nested configuration key and pass it to Knigge
directly with the :implementation
option, but with this approach I can't change it in runtime.
Hello @NickNeck and @sascha-wolf! Would you be so kind as to bring this PR to a release?
I'll try to find some time this week. Life has not been kind lately.