Skip to content

Recompile only necessary deps whenever config/lock change #11201

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

Merged
merged 8 commits into from
Aug 24, 2021

Conversation

josevalim
Copy link
Member

Whenever there is a change to the lock file or the config file, we will now only recompile the code that depends on the dependencies that changed (or that depends on any dependency that depends on the dependency that changed).

With the improvements in #11190, it means that we now only get a full recompilation when:

  1. an app is removed from the lock file
  2. when you change the configuration for your own app in config/config.exs (or an imported file from there)
  3. when you change elixirc_options/elixirc_paths

This is currently WIP, tests still pending.

@@ -724,7 +850,7 @@ defmodule Mix.Compilers.Elixir do
purge_old_manifest(compile_path, data)

_ ->
{[], [], %{}, nil}
{[], [], %{}, nil, nil, nil}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this function to return a map?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, a map or a record. I will add to my todo list.

@josevalim josevalim merged commit 10f62dd into master Aug 24, 2021
@josevalim josevalim deleted the jv-dep-recompile branch August 24, 2021 10:40
@josevalim
Copy link
Member Author

💚 💙 💜 💛 ❤️

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

Successfully merging this pull request may close these issues.

2 participants