Skip to content

Add build lock to deps.loadpaths #14108

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 1 commit into from
Dec 23, 2024

Conversation

jonatanklosko
Copy link
Member

deps.loadpaths we may call Mix.Tasks.Deps.Compile.compile/1, but currently it never acquires the lock.

Comment on lines +98 to +100
# We need to compile, we first grab the lock, then, we check
# again and compile if still applicable
Mix.Project.with_build_lock(config, fn ->
Copy link
Member Author

@jonatanklosko jonatanklosko Dec 23, 2024

Choose a reason for hiding this comment

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

Once the project is compiled, most calls to deps.loadpaths actually don't require compilation, so we don't want to acquire the lock upfront.

@josevalim josevalim merged commit 71ad8fa into elixir-lang:main Dec 23, 2024
7 of 9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

josevalim pushed a commit that referenced this pull request Dec 23, 2024
@jonatanklosko jonatanklosko deleted the jk-loadpaths-lock branch December 23, 2024 09:56
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