commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Halliday (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VFS-536) DefaultFileMonitor will ignore files forever if directory is deleted and recreated
Date Mon, 05 Jan 2015 22:01:35 GMT

    [ https://issues.apache.org/jira/browse/VFS-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265182#comment-14265182
] 

Sam Halliday commented on VFS-536:
----------------------------------

268 doesn't sound like the same thing, but I'll try and report back. The diff between that
patched file and master is quite substantial. In our case, lets say we have a directory structure
with a file in it:

  project/target/classes/foo/bar/FooBar.class

and we put a recursive file monitor on "project/target/classes", we will see any changes to
the files within.

However, if something (i.e. the build tool) deletes "project/target", and recreates it, we
never see any changes under the newly created directory --- including changes to project/target/classes/foo/bar/FooBar.class


> DefaultFileMonitor will ignore files forever if directory is deleted and recreated
> ----------------------------------------------------------------------------------
>
>                 Key: VFS-536
>                 URL: https://issues.apache.org/jira/browse/VFS-536
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Sam Halliday
>
> We're using VFS2 in our emacs scala ide https://github.com/ensime/ensime-server
> Unfortunately, I've just discovered that if we watch a directory, e.g. here we are watching
the target directory for class files that are created by a compiler
>  https://github.com/ensime/ensime-server/blob/master/src/main/scala/org/ensime/indexer/FileWatchers.scala#L28
> then if the directory is deleted and recreated (as is done by the SBT scala build tool!)
then monitoring events are ignored forever!
> I can confirm that file watching works fine if individual files are added or removed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message