-
Notifications
You must be signed in to change notification settings - Fork 39
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
Multiple watchers create multiple downloads and a conflict when installing #58
Comments
Use
|
@cw789 That sounded like a great solution at first but then I thought how is the second instance going to run when it hasn't been downloaded and installed yet by the first watcher? 🤷 😄 I think the right solution is to write a little DownloadGenServer that runs for all watchers and notifies them when the installation is complete. What do you think? |
I think we can ship with a supervision tree and spawn a process with a name (or ID). If the name is taken, it is because it is already running. So we don't need a GenServer per se, just the supervisor is enough. PRs welcome! |
Given the following
config.exs
:When the application is started with
iex -S mix phx.server
,the watchers are started concurrently and they try to download and install esbuild at the same time.
My educated guess is that one of them succeeds, but the other one encounters the installed binary and raises this error:
The two esbuild profiles exist because they are separate and produce different outputs and therefore cannot be handled by one esbuild invocation.
The text was updated successfully, but these errors were encountered: