Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MixTemplates.Specs.accumulate_specs/1 is accumulate_specs/2 #2

Open
aseigo opened this issue Apr 28, 2017 · 2 comments
Open

MixTemplates.Specs.accumulate_specs/1 is accumulate_specs/2 #2

aseigo opened this issue Apr 28, 2017 · 2 comments

Comments

@aseigo
Copy link

aseigo commented Apr 28, 2017

After mix archive.installing mix_generator and mix_templates (and then installing the project template via mix template.install), running mix gen project myapp results in this error:

[aseigo@localhost src]$ mix gen project foo
** (UndefinedFunctionError) function MixTemplates.Specs.accumulate_specs/1 is undefined or private. Did you mean one of:

  * accumulate_specs/2

MixTemplates.Specs.accumulate_specs(Mix.Gen.Template.Project)
lib/mix/tasks/gen.ex:155: Mix.Tasks.Gen.build_options/2
lib/mix/tasks/gen.ex:137: Mix.Tasks.Gen.generate_project/4
(mix) lib/mix/task.ex:294: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2

And indeed, in MixTemplates.Specs we see:

def accumulate_specs(template, base_option_specs) do

but in build_options(template, args) in lib/mix/tasks/gen.ex there is:

specs = Specs.accumulate_specs(template)

.... not sure if you want to provide a default for base_option_specs or pass in an empty list from build_options (otherwise I'd throw you a one-liner patch :)

@danielberkompas
Copy link
Contributor

I have a PR to fix this open here.

@aseigo
Copy link
Author

aseigo commented Apr 28, 2017

Yep, that works indeed ... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants