Skip to content

Commit cc0c964

Browse files
committed
avoid race condition by getting mix config in one go
1 parent 4cfc7f5 commit cc0c964

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

apps/language_server/lib/language_server/providers/workspace_symbols.ex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,15 @@ defmodule ElixirLS.LanguageServer.Providers.WorkspaceSymbols do
257257
## Helpers
258258

259259
defp get_app_modules() do
260+
config = Mix.Project.config()
261+
260262
apps =
261-
if Mix.Project.umbrella?() do
262-
for {app, _path} <- Mix.Project.apps_paths() do
263-
app
264-
end
265-
else
266-
[Mix.Project.config()[:app]]
263+
case Mix.Project.apps_paths(config) do
264+
nil ->
265+
config[:app] |> List.wrap()
266+
267+
map ->
268+
Map.keys(map)
267269
end
268270

269271
for app <- apps do

0 commit comments

Comments
 (0)