knigge icon indicating copy to clipboard operation
knigge copied to clipboard

Proposal: Searching for implementations with keys

Open NickNeck opened this issue 3 years ago • 7 comments

Hi, Sascha

my suggestion would be to extend the config_key option so that a list is also accepted. That would be usefull for behaviours 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.

NickNeck avatar Dec 13 '20 10:12 NickNeck

Coverage Status

Coverage increased (+0.8%) to 95.652% when pulling 66a7cfbfa46154aa22240b79bc1b8ddd66da8542 on hrzndhrn:proposal/config_key into e0886d345c7ee9af5be716a33b78d4f358cc999b on sascha-wolf:main.

coveralls avatar Mar 30 '21 05:03 coveralls

Hey @sascha-wolf what do you think is needed to merge this? I'm available to help if needed. Could really use this feature =)

escobera avatar Aug 30 '22 21:08 escobera

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.

NickNeck avatar Sep 26 '22 08:09 NickNeck

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.

sascha-wolf avatar Sep 28 '22 13:09 sascha-wolf

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.

NickNeck avatar Oct 14 '22 08:10 NickNeck

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.

SukhikhN avatar Jul 23 '23 22:07 SukhikhN

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.

sascha-wolf avatar Jul 24 '23 08:07 sascha-wolf