1# Contributing
2
3### Moving Notice
4
5We plan to include os/fsnotify in the Go standard library with a new [API](http://goo.gl/MrYxyA).
6
7* Import `code.google.com/p/go.exp/fsnotify` ([GoDoc](http://godoc.org/code.google.com/p/go.exp/fsnotify)) for the latest API under development.
8* Continue importing `github.com/howeyc/fsnotify` ([GoDoc](http://godoc.org/github.com/howeyc/fsnotify)) for the stable API.
9* [Report Issues](https://code.google.com/p/go/issues/list?q=fsnotify) to go.exp/fsnotify after testing against `code.google.com/p/go.exp/fsnotify`
10* Join [golang-dev](https://groups.google.com/forum/#!forum/golang-dev) to discuss fsnotify.
11* See the [Contribution Guidelines](http://golang.org/doc/contribute.html) for Go and sign the CLA.
12
13### Pull Requests
14
15To hack on fsnotify:
16
171. Install as usual (`go get -u github.com/howeyc/fsnotify`)
182. Create your feature branch (`git checkout -b my-new-feature`)
193. Ensure everything works and the tests pass (see below)
204. Commit your changes (`git commit -am 'Add some feature'`)
21
22Contribute upstream:
23
241. Fork fsnotify on GitHub
252. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
263. Push to the branch (`git push fork my-new-feature`)
274. Create a new Pull Request on GitHub
28
29For other team members:
30
311. Install as usual (`go get -u github.com/howeyc/fsnotify`)
322. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
333. Pull your revisions (`git fetch fork; git checkout -b my-new-feature fork/my-new-feature`)
34
35Notice: Always use the original import path by installing with `go get`.
36
37### Testing
38
39fsnotify uses build tags to compile different code on Linux, BSD, OS X, and Windows. Our continuous integration server is only able to test on Linux at this time.
40
41Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
42
43To make cross-platform testing easier, we've created a Vagrantfile for Linux and BSD.
44
45* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
46* Setup [Vagrant Gopher](https://github.com/gophertown/vagrant-gopher) in your `src` folder.
47* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
48* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd howeyc/fsnotify; go test ./...'`.
49* When you're done, you will want to halt or destroy the vagrant boxes.
50
51Notice: fsnotify file system events won't work on shared folders. The tests get around this limitation by using a tmp directory, but it is something to be aware of when logging in with `vagrant ssh linux` to do some manual testing.
52
53Right now we don't have an equivalent solution for Windows and OS X, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
54