Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excludes should include local opam (2.0.0) switches #1315

Closed

Conversation

dysinger
Copy link
Contributor

... otherwise dune build -w produces infinite

 inotifywait (internal) (exit 1) 
/usr/bin/inotifywait -r . --exclude \.#|_build|\.hg|\.git|~$|/#[^#]*#$|\.install$ -e close_write -e delete -q > /dev/null
Failed to watch .; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
Had errors.
Had errors.                      
 inotifywait (internal) (exit 1) 
/usr/bin/inotifywait -r . --exclude \.#|_build|\.hg|\.git|~$|/#[^#]*#$|\.install$ -e close_write -e delete -q > /dev/null
Failed to watch .; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
Had errors.
Had errors.                      
 inotifywait (internal) (exit 1) 
/usr/bin/inotifywait -r . --exclude \.#|_build|\.hg|\.git|~$|/#[^#]*#$|\.install$ -e close_write -e delete -q > /dev/null
Failed to watch .; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
Had errors.
Had errors.                      
 inotifywait (internal) (exit 1) 
/usr/bin/inotifywait -r . --exclude \.#|_build|\.hg|\.git|~$|/#[^#]*#$|\.install$ -e close_write -e delete -q > /dev/null
Failed to watch .; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
Had errors.
Had errors.                      
Waiting for filesystem changes...^C

@dysinger dysinger requested a review from a user September 22, 2018 17:32
Signed-off-by: Tim Dysinger <tim@dysinger.net>
@dysinger dysinger force-pushed the ignore-opam-2.0.0-local-switch-files branch from 7fff295 to 941409b Compare September 22, 2018 17:34
@dysinger dysinger changed the title excludes should include local opam (2.0.0) opam switches (if any) excludes should include local opam (2.0.0) switches (if any) Sep 22, 2018
@dysinger dysinger changed the title excludes should include local opam (2.0.0) switches (if any) excludes should include local opam (2.0.0) switches Sep 22, 2018
@rgrinberg
Copy link
Member

Excluding _opam isn't ideal though isn't it. It seems like it's nice to have automatic rebuilds whenever you make a change to the local switch.

I wonder if we can do a more coarse grained watch on the _opam dir.

@ghost
Copy link

ghost commented Sep 22, 2018

In fact, because dune completely ignores all directories starting with an underscore or a dot, we shouldn't be watching _opam. However I don't know how to tell that to inotifywait or fswatch.

@rgrinberg, what we would really want is to watch all external dependencies, whether they are in a local opam switch or not. Though that's even more complicated.

For this particular case, given that the current behaviour prevents users of opam local switches from using watch mode, we should just merge this PR.

@rgrinberg
Copy link
Member

Alright, will merge manually with an appropriate change entry. Yeah, I guess we shouldn't be discovering external deps by peeking into the switch dir anyway. After all, we get most of the deps from findlib.

@rgrinberg
Copy link
Member

@dysinger thank you for your contribution. I've merged it manually to master with an appropriate CHANGES entry.

@rgrinberg rgrinberg closed this Sep 23, 2018
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 23, 2018
CHANGES:

- Support colors on Windows (ocaml/dune#1290, @diml)

- Allow `dune.configurator` and `base` to be used together (ocaml/dune#1291, fix
  ocaml/dune#1167, @diml)

- Support interrupting and restarting builds on file changes (ocaml/dune#1246,
  @kodek16)

- Fix findlib-dynload support with byte mode only (ocaml/dune#1295, @bobot)

- Make `dune rules -m` output a valid makefile (ocaml/dune#1293, @diml)

- Expand variables in `(targets ..)` field (ocaml/dune#1301, ocaml/dune#1320, fix ocaml/dune#1189, @nojb,
  @rgrinberg, @diml)

- Fix a race condition on Windows that was introduced in 1.2.0
  (ocaml/dune#1304, fix ocaml/dune#1303, @diml)

- Fix the generation of .merlin files to account for private modules
  (@rgrinberg, fix ocaml/dune#1314)

- Exclude the local opam switch directory (`_opam`) from the list of watched
  directories (ocaml/dune#1315, @dysinger)

- Fix compilation of the module generated for `findlib.dynload`
  (ocaml/dune#1317, fix ocaml/dune#1310, @diml)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 23, 2018
CHANGES:

- Support colors on Windows (ocaml/dune#1290, @diml)

- Allow `dune.configurator` and `base` to be used together (ocaml/dune#1291, fix
  ocaml/dune#1167, @diml)

- Support interrupting and restarting builds on file changes (ocaml/dune#1246,
  @kodek16)

- Fix findlib-dynload support with byte mode only (ocaml/dune#1295, @bobot)

- Make `dune rules -m` output a valid makefile (ocaml/dune#1293, @diml)

- Expand variables in `(targets ..)` field (ocaml/dune#1301, ocaml/dune#1320, fix ocaml/dune#1189, @nojb,
  @rgrinberg, @diml)

- Fix a race condition on Windows that was introduced in 1.2.0
  (ocaml/dune#1304, fix ocaml/dune#1303, @diml)

- Fix the generation of .merlin files to account for private modules
  (@rgrinberg, fix ocaml/dune#1314)

- Exclude the local opam switch directory (`_opam`) from the list of watched
  directories (ocaml/dune#1315, @dysinger)

- Fix compilation of the module generated for `findlib.dynload`
  (ocaml/dune#1317, fix ocaml/dune#1310, @diml)
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 24, 2018
CHANGES:

- Support colors on Windows (ocaml/dune#1290, @diml)

- Allow `dune.configurator` and `base` to be used together (ocaml/dune#1291, fix
  ocaml/dune#1167, @diml)

- Support interrupting and restarting builds on file changes (ocaml/dune#1246,
  @kodek16)

- Fix findlib-dynload support with byte mode only (ocaml/dune#1295, @bobot)

- Make `dune rules -m` output a valid makefile (ocaml/dune#1293, @diml)

- Expand variables in `(targets ..)` field (ocaml/dune#1301, ocaml/dune#1320, fix ocaml/dune#1189, @nojb,
  @rgrinberg, @diml)

- Fix a race condition on Windows that was introduced in 1.2.0
  (ocaml/dune#1304, fix ocaml/dune#1303, @diml)

- Fix the generation of .merlin files to account for private modules
  (@rgrinberg, fix ocaml/dune#1314)

- Exclude the local opam switch directory (`_opam`) from the list of watched
  directories (ocaml/dune#1315, @dysinger)

- Fix compilation of the module generated for `findlib.dynload`
  (ocaml/dune#1317, fix ocaml/dune#1310, @diml)

- Lift restriction on `copy_files` and `copy_files#` stanzas that files to be
  copied should be in a subdirectory of the current directory.
  (ocaml/dune#1323, fix ocaml/dune#911, @nojb)
@dysinger dysinger deleted the ignore-opam-2.0.0-local-switch-files branch October 4, 2018 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants