Comments (11)
I think this might be due an issue with the BSER client in the watchman CLI.
Try this instead:
$ watchman --persistent --server-encoding=json log-level debug
from watchman.
Thanks. I'm now getting a bunch of assessing triggers
messages. To clarify, is that to fix the issue with debugging or with watchman not executing scripts? If the latter, is there a way to set server-encoding to json always (I'm assuming that watchman does its own thing with starting up; correct me if I'm wrong)?
from watchman.
my comment was about connecting to the debug output. You haven't given any details on your other issue, so it's difficult to say whats's going on. What does watchman trigger-list $root
say?
from watchman.
{
"version": "2.8.2",
"triggers": [
{
"name": "generatestatic",
"command": [
"./scripts/celerity_mapper.php ./webroot"
],
"rules": [
{
"pattern": "*.css",
"include": true,
"negated": false
}
]
}
]
}
Running ./scripts/celerity_mapper.php ./webroot
from the root works fine, and git status
does show that .css files have been modified. I tried using absolute paths too, to no avail.
from watchman.
Run watchman --persistent --server-encoding=json log-level debug
in one window, then in another, touch a .css file. Watchman should assess the trigger for your css and try to invoke celerity_mapper.php.
The triggers happen on file changes as they are noticed; it doesn't talk to git to see if the file is different
from watchman.
Output: http://pastebin.com/d8QeTWej
The triggers happen on file changes as they are noticed; it doesn't talk to git to see if the file is different
I'm aware; git status
shows that the .css files are modified but once they have been it should also show that ./src/__celerity_resource_map__.php
has been modified too.
from watchman.
Have to dash, but wanted to quickly respond: the output in your paste shows that watchman is trying to execute this:
"./scripts/celerity_mapper.php ./webroot" "changedfile.css"
We use a driver script for the command; you could do something like:
#!/bin/sh
exec ./scripts/celerity_mapper.php ./webroot $*
and then register that as your trigger
from watchman.
The command which needs to be executed is ./scripts/celerity_mapper.php ./webroot
. Is there a way to omit the argument which watchman adds?
This is the command I'm using to create the trigger.
watchman -- trigger /var/www/phabricator generatestatic '*.css' -- "./scripts/celerity_mapper.php ./webroot"
from watchman.
If you don't want to pass the changed files to celerity_mapper.php, you should use a script like this:
#!/bin/sh
exec ./scripts/celerity_mapper.php ./webroot
Then
watchman -- trigger /var/www/phabricator generatestatic '*.css' -- './scripts/run-celerity-mapper.sh'
otherwise, change your quoting so that it runs the right thing:
watchman -- trigger /var/www/phabricator generatestatic '*.css' -- ./scripts/celerity_mapper.php ./webroot
We don't currently have a way to tell the trigger dispatcher to not pass the changed filenames, but do want to add that functionality.
from watchman.
I had tried that originally but this is the only debug output when I changed the CSS file:
{
"version": "2.8.2",
"log": "1381517326: tid=798742272 inotify read: returned 256.\n"
}
{
"version": "2.8.2",
"log": "1381517326: tid=798742272 inotify read: returned 192.\n"
}
It doesn't look like it's trying to execute celerity_mapper.php?
from watchman.
I turned off BSER by default in the CLI, so I'm considering this good enough for now.
The future for this is a BSER implementation based on libphenom when I finally get a chance to push that diff.
from watchman.
Related Issues (20)
- not bin HOT 1
- Publish new serde_bser version
- Installation error: ‘CertUtils’ has not been declared in ‘fizz (Ubuntu 22.04.3 LTS) HOT 3
- Unable to install watchman on arch HOT 2
- Prebuilt Linux binaries are unusable on any modern system HOT 5
- PCRE link is broken
- MacOS binaries missing HOT 5
- Hard dependency on Homebrew HOT 1
- Windows binaries are missing
- Unable to install pywatchman
- Unable to build watchman from source for ubuntu in the latest versions of releases HOT 1
- Could you provide `fc39.x86_64.rpm`? HOT 1
- Error from yarn gets written into plist
- Prebuilt macOS binaries no longer exist HOT 5
- `watchman list` command crashes with boost/icu4c HOT 1
- `watchman --version` always return `0.0.0` when building from source HOT 2
- Unable to resolve module @babel/runtime/helpers/interopRequireDefault
- Wiji
- Mistake in Readme file
- Build failure: `'apache::thrift::HandlerCallbackPtr' has not been declared`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchman.