Revise not getting loaded in Julia Test Process, inside VS Code container

I’ve found the issue, with some help from this answer on a similar post from 2019:

Also a few related links:

Basically, Revise relies on getting notified when files change, but that doesn’t work properly inside a Docker container, for files which are actually on the Windows host machine and accessed via a bind volume mount inside the container.

I found two workarounds:

  1. Use the Revise polling mode by setting JULIA_REVISE_POLL=1 in the environment before loading Revise. This checks files every several seconds for changes, and it does work although it’s frustrating to have to wait.
  2. Use Revise within the container only for files within the “native” Unix filesystem, not files mounted from the host system. E.g. clone the package repo into the home directory inside the container and just work there. Revise works perfectly with that setup. The only downside is you can’t quickly work with the same filetree in the host system, but in practice that’s not an issue.

Hope this helps someone else who comes across the same issue!

2 Likes