# Only one elm-make process at once?

**URL:** <https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291>\
**Category:** Request Feedback\
**Created:** [December 19, 2017, 9:49am UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291 "2017-12-19T09:49:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaeljones](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/michaeljones/32/152_2.png) [@michaeljones](https://discourse.elm-lang.org/u/michaeljones)\
**Post date:** [December 19, 2017, 9:49am UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/1 "2017-12-19T09:49:32Z")

</div>

I have webpack running with the elm loader, I sometimes run builds from the command line and I sometimes run builds from within my editor directly. When these various process are running at once they all run very slowly. I would like something to help avoid this.

Is there any solution to that? Because Elm development is so compiler driven I often get away with stopping webpack until I’m happy with the state of the code but it would be nice to have a smoother journey.

I have spend a bit of time righting a very basic node script that does a kind of client server thing, with a fake ‘elm-make’ script that sits in front of ‘elm-make’ on the PATH, so that elm-make calls just send the command line args to the server that only does one compile at a time. Basic tests seem to work but I haven’t pushed it too far. I’m curious to learn if others have attempted to tackle it? Or will it be addressed in the 0.19 at all? I have seen the issue mentioned in the community before though only once.

---

<div class="post-metadata">

**Author:** ![eeue56](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/eeue56/32/7_2.png) [@eeue56](https://discourse.elm-lang.org/u/eeue56)\
**Post date:** [December 19, 2017, 1:22pm UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/2 "2017-12-19T13:22:06Z")

</div>

> Is there any solution to that? Because Elm development is so compiler driven I often get away with stopping webpack until I’m happy with the state of the code but it would be nice to have a smoother journey.

The usual work flow is to have webpack watch your files, then read the compile errors from webpack, rather than building in your editor. Personally, I would just run webpack as needed – but that does have the downside of being slow 🙂

---

<div class="post-metadata">

**Author:** ![michaeljones](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/michaeljones/32/152_2.png) [@michaeljones](https://discourse.elm-lang.org/u/michaeljones)\
**Post date:** [December 19, 2017, 1:26pm UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/3 "2017-12-19T13:26:36Z")

</div>

Thanks! Fair point. I find the all red webpack output to be harder to parse & deal with. Maybe there is a way of adjusting that.

I often stop webpack but there are times when it is useful to have it running.

---

<div class="post-metadata">

**Author:** ![Sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/sebastian/32/98_2.png) [@Sebastian](https://discourse.elm-lang.org/u/Sebastian)\
**Post date:** [December 19, 2017, 11:08pm UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/4 "2017-12-19T23:08:14Z")

</div>

I’m doing the same. Stop webpack, develop using elm-make until I’m happy and then start webpack again. Trying to code something non-trivial is way too slow with Webpack running.

---

<div class="post-metadata">

**Author:** ![avh4](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/avh4/32/97_2.png) [@avh4](https://discourse.elm-lang.org/u/avh4)\
**Post date:** [December 26, 2017, 4:01am UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/5 "2017-12-26T04:01:20Z")

</div>

We have this problem at work, and a solution I’d like to try but haven’t had time to implement yet is: write a wrapper script to replace the elm-make binary that would block until all other elm-makes have finished before starting the real elm-make. This could potentially be implemented as an npm package that wraps the existing npm elm pacakge to make installing it easy.

---

<div class="post-metadata">

**Author:** ![michaeljones](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/michaeljones/32/152_2.png) [@michaeljones](https://discourse.elm-lang.org/u/michaeljones)\
**Post date:** [December 26, 2017, 11:08am UTC](https://discourse.elm-lang.org/t/only-one-elm-make-process-at-once/291/6 "2017-12-26T11:08:51Z")

</div>

Good to hear! I had a similar thought and have put this together: [https://github.com/michaeljones/elm-make-server](https://github.com/michaeljones/elm-make-server)

There might be better ways to approach it but this seems to work though I haven’t had a chance to test it at length. I’m going to give it a go when I get back to my project at work in the new year.

It isn’t the easiest to set up but hopefully provides a potential proof of concept. I would love to hear some feedback.
