Skip to content

mix format crashes at umbrella root with MatchError #231

@matthewsinclair

Description

@matthewsinclair

Running mix format from an umbrella project root crashes with:

** (MatchError) no match of right hand side value: {[%{name: MyUmbrella.MixProject, ...}], []}
    (mix) lib/mix/project_stack.ex:68: Mix.ProjectStack.on_recursing_root/1

Reproduction

  1. Create umbrella with mix new my_umbrella --umbrella
  2. Add Ash/Spark to a sub-app
  3. Configure Spark.Formatter plugin in sub-app's .formatter.exs
  4. Run mix format from umbrella root

Root Cause

Regression from #228 fix. The Mix.Task.run("compile") call added in 9eddbeb
causes recursive compilation during formatting, which Mix.ProjectStack doesn't support.

Workaround

Run format from within sub-apps instead of umbrella root.

Fix submitted in #230

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions