Closed jamesarosen closed 5 years ago
:+1: - I totally agree that this is something we need to fix. The major blocker is upgrading to broccoli@1.0.0, which moves tmp
out of <project-root>/tmp
and into $TMPDIR
(the systems default temp directory location but allows it to be configurable.
Is there an issue to track the upgrade to broccoli@1.0.0?
AFAIK, no. But we should make one so we can have a single place to point folks to track progress (or pitch in and help)...
I think this can be closed, as support for Broccoli 2 and system /tmp has landed, right?
Yep, thank you!
We run ember-cli within a Docker container for development. (This issue is less meaningful for Dockerized Ember FastBoot running in production.)
Standard Docker practice is to have a container that
node
andwatchman
installedNormally, this might look something like
The problem with that mount is that it also syncs
/Users/me/code/my-app/tmp/**/*.*
, which can be very expensive. That's because Docker waits for all syncs to happen before triggering the file-system event(s). In our tests, the time between saving a single file and ember-cli starting a rebuild is 30 seconds, up from less than a second when we excludemy-app/tmp
.Unfortunately, there's no syntax in Docker for excluding a particular subdirectory, so we end up mounting parts of the app individually:
It would be lovely if we could configure ember-cli's
tmp
directory to be e.g./tmp
so that it's not part of the mount.We can do this for broccoli addons that extend broccoli-persistent-filter by setting
BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT
, but that's far from everything that an ember-cli application puts in./tmp
.