Make :seo_jsonld compiler recursive so it works in umbrella projects - #23
Merged
Merged
Conversation
Running `mix compile` from an umbrella root crashes with:
** (RuntimeError) trying to access Mix.Project.app_path/1 for an
umbrella project but umbrellas have no app
Because the compiler is not marked recursive, an umbrella `mix compile`
dispatches it mid-recursion via `Mix.ProjectStack.on_recursing_root/1`,
which switches the active project to the umbrella root. `sources_dir/0`
(and `compile_path/0`/`manifest_path/0`) then call `Mix.Project.app_path/0`,
which raises for an umbrella.
Marking the compiler `@recursive true` keeps it executing in the child
app that lists it in `:compilers`, so the project-path helpers resolve
correctly. Non-umbrella projects are unaffected.
Owner
|
Thanks for the report and PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
mix compilefrom an umbrella root crashes with:Because the compiler is not marked recursive, an umbrella
mix compiledispatches it mid-recursion viaMix.ProjectStack.on_recursing_root/1, which switches the active project to the umbrella root.sources_dir/0(andcompile_path/0/manifest_path/0) then callMix.Project.app_path/0, which raises for an umbrella.Marking the compiler
@recursive truekeeps it executing in the child app that lists it in:compilers, so the project-path helpers resolve correctly. Non-umbrella projects are unaffected.