bancolombia / scaffold-clean-architecture-ex

Mix task to create a clean architecture application in Elixir that already works, It follows our best practices!
MIT License
13 stars 3 forks source link

custom_telemetry.ex is not being generated #25

Closed gevera closed 1 year ago

gevera commented 1 year ago

Executing

mix ca.new.structure myproject

does not generate custom_telemetry.ex file in /lib/utils

image

juancgalvis commented 1 year ago

Hi @gevera,

Can you please give us the version of elixir_structure_manager that you are using: mix archive

I cannot reproduce the error with the current latest version, 0.1.7.

I have checked with metrics and without metrics enabled.

With Metrics

mix ca.new.structure sample_to_delete -m
cd sample_to_delete
mix ca.new.da -t repository -n location

Without Metrics

mix ca.new.structure sample_to_delete
cd sample_to_delete
mix ca.new.da -t repository -n location

However, if you have set the metrics: true configuration property manually, the error might occur

# mix.exs
  def project do
    [
      app: :sample_to_delete,
      version: "0.1.0",
      elixir: "~> 1.13",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      test_coverage: [tool: ExCoveralls],
      preferred_cli_env: [
        coveralls: :test,
        "coveralls.detail": :test,
        "coveralls.post": :test,
        "coveralls.html": :test,
        "coveralls.xml": :test
      ],
      metrics: true # this
    ]
  end

If you have generated a project without metrics and then you want to enable it on your project, you should run: mix ca.apply.config -t metrics

Thank you by using this tool!

gevera commented 1 year ago

Ok, that makes sense. This did the trick mix ca.apply.config -t metrics Thanks for prompt reply