Elixir Conform library configuration error with unrecognized type

81 Views Asked by At

In my application, I have a below configuration for cron job scheduler

config :my_app, MyApp.Scheduler,
  jobs: [
    {"* * * * *", {MyApp.Core, :routine, []}}
]

I am using conform library for setting up configurations for releases

Then I am running mix conform.new to generate config/my_app.schema.exs which looks like this

[
  extends: [],
  import: [],
  mappings: [
    "my_app.Elixir.MyApp.Scheduler.jobs": [
      commented: false,
      datatype: [
        list: {:binary, {:atom, :atom, :binary}}
      ],
      default: [
        {"* * * * *", {MyApp.Core, :routine, []}}
      ],
      doc: "Provide documentation here.",
      hidden: false,
      to: "my_app.Elixir.MyApp.Scheduler.jobs"
    ]
  ],
  transforms: [],
  validators: []
]

Then after this, the above file is used to generate the .conf file with this command mix conform.configure and it generates the my_app.dev.conf file but with the following error

Unable to stringify my_app.Elixir.MyApp.Scheduler.jobs, unrecognized type {:binary, {:atom, :atom, :binary}}

Also the .conf file looks like this with empty value

# Provide documentation for my_app.Elixir.MyApp.Scheduler.jobs here.
my_app.Elixir.MyApp.Scheduler.jobs = 

What needs to be transformed so that the above configuration should work.

0

There are 0 best solutions below