You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@wez edited this issue to place this status at the top
Current status: Alpha for 64-bit Windows.
It builds and passes the test suite on Windows Server 2012 R2 (x64) and should work on Windows 7 and later. PCRE expression terms are not currently supported.
At this time we're looking for alpha testers. Watchman on Windows may hang, crash or otherwise be unreliable. If you encounter problems we'll need you to provide detailed information about how to trigger the problem, and we may ask you to use visual studio to attach and perform some rudimentary debugging.
If you are consuming watchman from nodejs, the existing fb-watchman package available via npm should work, but the version in master has slightly better diagnostics in case you experience hangs.
Reacted by JC, zhangwebb, Jan Kalfus, Ruben Martin, Adriano Cahete, ZQiang94, Muly Oved, Bimal, Mark Penner, Mahmudin muttaqin and 6 more
Windows is not currently supported. We have no immediate plans to add support for it. We would welcome a contribution to add this support if someone has the time and inclination to produce it.
To support Windows, we first need to tidy up our handling of case-insensitive filesystems; that work is in-progress, but we still have no immediate plans for Windows at this time.
This is something you guys may want to watch out when using ReadDirectoryChangesW [1]
I dropped ReadDirectoryChangesW because maintaining a 'live' file system cache became more and more
complicated. For example, according to MSDN docs, ReadDirectoryChangesW may report short DOS 8.3
names (i.e. "PROGRA~1" instead of "Program Files"), so a correct and fast cache implementation would
have to be indexed by long and short names...
You might want to consider using the NTFS Change Journal. It is rock solid. I used it for Evolver, a closed source version control system that I developed for a game company in 2002.
You will need the microsoft visual C++ compiler to build it; you can use the community edition for this.
The compiler tools (cl, nmake and so on) must be in your path.
To run the integration tests you will need arcanist and php installed and in your path.
To build and test:
cd watchman
nmake -f winbuild\Makefile check
arc test
The integration tests are a bit rough and ready largely because of the filesystem semantics on windows are not POSIX; there are a lot of errors around attempting to delete dirs while handles are still open on them. There are also some errors with / instead of \ in path names. These are for the most part cosmetic.
The current status is 26 of 74 tests failed.
If you're interested in helping with hacking and testing, you are most welcome! We're at the cleaning things up stage.
Great! I just tried to compile and run watchman.exe, but the code seems to use Windows 8 specific APIs, while we're still at Windows 7. For example, the API function GetOverlappedResultEx is used. Is this by design?
Windows 8 has a number of API calls that make it easier to port posix style applications and we're currently using those. In addition, I didn't have easy access to Windows 7 while I was prototyping this. I'm not opposed to making changes to have this run on Windows 7.
It seems the only Win8 specific API function call is the GetOverlappedResultEx. At first sight it seems you can just replace this with the old GetOverlappedResult function, since your timeout is either 0 or INFINITE, so the timeout maps to the BOOL bWait argument of the old function.
I was able to compile and run the watchman fine on my Win7 machine, and the log shows that watching indeed works.
I was not yet able to get the hgwatchman Mercurial extension running on Windows, but I suspect I have a conflict between 32-bit and 64-bit version. I'll dig deeper.
@ziriax great! I just (force) pushed some fixes to my branch to pick up the python build and test bits. You'll also see how to establish the named pipe connection you'll need for hgwatchman--you have to use os.open because the higher level file abstraction in python doesn't work properly with named pipes
I remembered that I added make.bat in my branch as a short cut, so you can just run:
make
to have it run nmake with the right makefile for you. This script will also source the visual studio build environment. We're moving towards having the tests use python, so it is best if you have python in your path when you build; I'm using python 2.7.
@wez: I'm writing a plugin for vscode: graphql-for-vscode which relies on watchman. Users have been using it for about a month now, and till date there's not been a single issue. Pretty good work by your team 👍
@wez The clockspec on Windows looks a bit weird; it doesn't seem to match the two segment clockspec shown in the docs. Is there some special meaning for each
I get something with four segments when I run watchman since D:\depot\git\agentautodeditor\sampledata n:foo '':
Additionally, this clockspec seems to increment every time I run that command, whereas from my understanding of the docs logical clock IDs should not increment unless files have actually changed in the directory. I've been using watchman clock D:\depot\git\agentautodeditor\sampledata instead, which seems to maintain a stable clock when I haven't changed anything.
Could you point me to some detailed docs on the anatomy of a clock id, and whether this is how things should be working?
OK folks, thanks for following along; I'm going to promote us from alpha to beta on Windows, so I'm closing this issue.
The install section of the docs has more information about downloading and installing the beta, as well as encouraging folks to file issues if/when they encounter them.
The issue is that the default for pr is true so it's trying to download artifacts from the not-yet-ready cmake changes I'm hacking on in another pr :-/
Activity
wez commentedon Jan 10, 2014
Windows is not currently supported. We have no immediate plans to add support for it. We would welcome a contribution to add this support if someone has the time and inclination to produce it.
Add note about no Windows support
wez commentedon Apr 20, 2014
To support Windows, we first need to tidy up our handling of case-insensitive filesystems; that work is in-progress, but we still have no immediate plans for Windows at this time.
wez commentedon Nov 2, 2014
We're tracking the list of things that would need to be tackled for Windows support in this wiki page:
https://github.com/facebook/watchman/wiki/Changes-required-for-Windows-support
pclouds commentedon Nov 11, 2014
This is something you guys may want to watch out when using ReadDirectoryChangesW [1]
[1] http://article.gmane.org/gmane.comp.version-control.git/216195
ziriax commentedon Jun 11, 2015
You might want to consider using the NTFS Change Journal. It is rock solid. I used it for Evolver, a closed source version control system that I developed for a game company in 2002.
It seems a Python wrapper is already made
wez commentedon Jul 27, 2015
cc: @dsp
I just pushed https://github.com/wez/watchman/tree/win with my hacking in progress; it's been sitting on my laptop for a while and I just rebased on master as of today and make sure that it still builds on both osx and windows.
You will need the microsoft visual C++ compiler to build it; you can use the community edition for this.
The compiler tools (
cl,nmakeand so on) must be in your path.To run the integration tests you will need arcanist and php installed and in your path.
To build and test:
The integration tests are a bit rough and ready largely because of the filesystem semantics on windows are not POSIX; there are a lot of errors around attempting to delete dirs while handles are still open on them. There are also some errors with
/instead of\in path names. These are for the most part cosmetic.The current status is
26 of 74 tests failed.If you're interested in helping with hacking and testing, you are most welcome! We're at the cleaning things up stage.
If you're interested in making a client connect to it, you can connect to a named pipe for the current user; for example, my watchman instance listens at
\\.\pipe\watchman-wez. The code to select the default name of the pipe can be found here: https://github.com/wez/watchman/blob/win/main.c#L456Once connected, you use the standard JSON or BSER watchman protocol to communicate with the server.
ziriax commentedon Jul 27, 2015
Great! I just tried to compile and run watchman.exe, but the code seems to use Windows 8 specific APIs, while we're still at Windows 7. For example, the API function GetOverlappedResultEx is used. Is this by design?
wez commentedon Jul 27, 2015
Windows 8 has a number of API calls that make it easier to port posix style applications and we're currently using those. In addition, I didn't have easy access to Windows 7 while I was prototyping this. I'm not opposed to making changes to have this run on Windows 7.
watchman: start building python based test suite
ziriax commentedon Jul 29, 2015
It seems the only Win8 specific API function call is the
GetOverlappedResultEx. At first sight it seems you can just replace this with the oldGetOverlappedResultfunction, since your timeout is either0orINFINITE, so the timeout maps to theBOOL bWaitargument of the old function.I was able to compile and run the watchman fine on my Win7 machine, and the log shows that watching indeed works.
I was not yet able to get the hgwatchman Mercurial extension running on Windows, but I suspect I have a conflict between 32-bit and 64-bit version. I'll dig deeper.
watchman: windows fixup a few issues
wez commentedon Jul 29, 2015
@ziriax great! I just (force) pushed some fixes to my branch to pick up the python build and test bits. You'll also see how to establish the named pipe connection you'll need for hgwatchman--you have to use
os.openbecause the higher level file abstraction in python doesn't work properly with named pipeswez commentedon Jul 29, 2015
I remembered that I added
make.batin my branch as a short cut, so you can just run:to have it run nmake with the right makefile for you. This script will also source the visual studio build environment. We're moving towards having the tests use python, so it is best if you have python in your path when you build; I'm using python 2.7.
windows: add dirname term to build, fix some paths
70 remaining items
kumarharsh commentedon Dec 15, 2016
@wez: I'm writing a plugin for vscode: graphql-for-vscode which relies on watchman. Users have been using it for about a month now, and till date there's not been a single issue. Pretty good work by your team 👍
wez commentedon Dec 15, 2016
@muloka do you mean alternatives to watchman, or just tools for windows?
muloka commentedon Dec 16, 2016
@wez Alternatives to watchman that are suitable for Windows
Anyway since writing my comment I've dabbled in both Powershell and syncthing
Using the two I've managed to arrive at a solution that works.
lednhatkhanh commentedon Jan 16, 2017
Hi, where can I find the latest windows version?
kumarharsh commentedon Jan 27, 2017
@lednhatkhanh The link is in the original post above: http://bit.ly/watchmanwinalpha
wez commentedon Jun 2, 2017
Figured out that we can use this link to always reference the latest build:
https://ci.appveyor.com/api/projects/wez/watchman/artifacts/watchman.zip?branch=master&job=Environment:+WATCHMAN_WIN7_COMPAT%3D
(updated the description to reflect this)
masaeedu commentedon Jun 6, 2017
@wez The clockspec on Windows looks a bit weird; it doesn't seem to match the two segment clockspec shown in the docs. Is there some special meaning for each
I get something with four segments when I run
watchman since D:\depot\git\agentautodeditor\sampledata n:foo '':Additionally, this clockspec seems to increment every time I run that command, whereas from my understanding of the docs logical clock IDs should not increment unless files have actually changed in the directory. I've been using
watchman clock D:\depot\git\agentautodeditor\sampledatainstead, which seems to maintain a stable clock when I haven't changed anything.Could you point me to some detailed docs on the anatomy of a clock id, and whether this is how things should be working?
wez commentedon Jun 6, 2017
@masaeedu would you mind opening a separate issue to ask those questions? This one is already pretty overloaded and long
wez commentedon Jun 8, 2017
OK folks, thanks for following along; I'm going to promote us from alpha to beta on Windows, so I'm closing this issue.
The install section of the docs has more information about downloading and installing the beta, as well as encouraging folks to file issues if/when they encounter them.
https://facebook.github.io/watchman/docs/install.html#download-for-windows-beta
chidionuekwusi commentedon Mar 12, 2018
The link is broken

AdrianoCahete commentedon Mar 12, 2018
This is working: https://ci.appveyor.com/api/buildjobs/41p1lupk97crwvm0/artifacts/watchman.zip
wez commentedon Mar 12, 2018
This link works correctly:
https://ci.appveyor.com/api/projects/wez/watchman/artifacts/watchman.zip?branch=master&job=Environment:+WATCHMAN_WIN7_COMPAT%3D&pr=false
The issue is that the default for
pris true so it's trying to download artifacts from the not-yet-ready cmake changes I'm hacking on in another pr :-/change logging in exit handlers to not avoid locking