Giter Site home page Giter Site logo

int128 / idea-fsnotifier-wsl Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 2.0 28 KB

IntelliJ IDEA fsnotifier for WSL (Windows Subsystem for Linux)

License: Apache License 2.0

C 99.53% Shell 0.47%
intellij-idea windows-subsystem-linux fsnotify bash-on-windows

idea-fsnotifier-wsl's Introduction

IntelliJ IDEA fsnotifier for WSL CircleCI

IntelliJ IDEA for Linux works on WSL (Windows Subsystem for Linux; Bash for Windows) as well, but the file watching feature is not available for now. It shows the following warning on startup:

โš ๏ธ External file changes sync may be slow. File watcher gave up to operate.

screenshot

This project provides fsnotifier module that allows the file watching feature works on WSL. External file changes will immediately appear.

How to use

Download the latest release and install it into $IDEA/bin.

ls -la fsnotifier64
cp -av fsnotifier64 ~/bin/idea-IC-*/bin/

Run IDEA and check if the warning does not appear.

Build from source

Make sure you have a C compiler.

sudo apt install build-essential
cc -v

Make and install it into $IDEA/bin.

./make.sh
ls -la fsnotifier64
cp -av fsnotifier64 ~/bin/idea-IC-*/bin/

How it works

Currently fsnotifier64 fails on WSL, because WSL does not provide /proc/sys/fs/inotify/max_user_watches and /etc/mtab.

This skips checking /proc/sys/fs/inotify/max_user_watches. Also it reads from /proc/mounts instead of /etc/mtab. See commits for more.

Contribution

This is based on JetBrains/intellij-community/native/fsNotifier/linux.

Feel free to open an issue or pull request. Original and this are public under Apache License 2.0.

idea-fsnotifier-wsl's People

Contributors

int128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

idea-fsnotifier-wsl's Issues

Cannot get it working with PyCharm (XServer)

I have followed the instructions perfectly unless I understand something wrong with regards to the process. I am running PyCharm from within WSL via XServer. Problem still persists. Could it be that the $IDEA/bin path I am supplying is wrong?

Currently I have only PyCharm installed from JeBrains within WSL and what I do is download the binary make.sh in the download directory and copy the generated fsnotifier64 to <PycharmInstallationDirectory>/bin. Could you maybe help me out?

fsnotifier causes erroneusly restart of Flask application

Flask application in debug mode constantly restarted because of environment files not belonging to the project:

 * Restarting with watchdog (inotify)
 * Debugger is active!
 * Debugger PIN: 106-816-122
 * Detected change in '/home/youjin/miniconda3/envs/webmongo/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing/core.py', reloading
 * Detected change in '/home/youjin/miniconda3/envs/webmongo/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/markers.py', reloading
 * Detected change in '/home/youjin/miniconda3/envs/webmongo/lib/python3.7/site-packages/setuptools/_vendor/pyparsing/core.py', reloading
 * Detected change in '/home/youjin/miniconda3/envs/webmongo/lib/python3.7/site-packages/setuptools/_vendor/packaging/markers.py', reloading

No such problem on pure Linux with same environment

table errors

idea-fsnotifier-wsl is working great when started on a clean project, but when I build my projects, I start getting syslog errors like:
fsnotifier[3729]: table error: corruption at 1025:/home/mcraig/projects/foo/.../target/streams/compile/managedClasspath / 1:/home/mcraig/projects/foo)
fsnotifier[7887]: table error: corruption at 1025:/opt/jdk/jdk1.8.0_131/jre/lib/ext/zipfs.jar / 1:/home/mcraig/projects/bar)
and then, in IntelliJ's Event Log:
External file changes sync may be slow: File watcher failed to start
and in ~/.IntelliJIdea2017.2/system/log/idea.log:

2017-12-18 22:46:20,402 [ 109620]   INFO - pl.local.NativeFileWatcherImpl - Starting file watcher:
/home/mcraig/intellij/idea-IU-172.4574.11/bin/fsnotifier64
2017-12-18 22:46:21,006 [ 110224]   WARN - pl.local.NativeFileWatcherImpl - Watcher terminated with
 exit code 3
2017-12-18 22:46:21,006 [ 110224]   WARN - api.vfs.impl.local.FileWatcher - File watcher failed to
start

(Projects are Scala/SBT, so compilation behavior ought to be more or less similar to other JVM/byte code projects, AFAIU.)

Please let me know if I can be of any additional help in debugging this issue. Really appreciate the project. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.