{"action":"closed","issue":{"url":"https://api.github.com/repos/sass/node-sass/issues/1538","repository_url":"https://api.github.com/repos/sass/node-sass","labels_url":"https://api.github.com/repos/sass/node-sass/issues/1538/labels{/name}","comments_url":"https://api.github.com/repos/sass/node-sass/issues/1538/comments","events_url":"https://api.github.com/repos/sass/node-sass/issues/1538/events","html_url":"https://github.com/sass/node-sass/issues/1538","id":153971444,"number":1538,"title":"CLI watcher's import graph is not updated when files are added or deleted","user":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sass/node-sass/labels/Bug%20-%20Confirmed","name":"Bug - Confirmed","color":"e11d21"},{"url":"https://api.github.com/repos/sass/node-sass/labels/Module%20-%20CLI","name":"Module - CLI","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sass/node-sass/milestones/8","html_url":"https://github.com/sass/node-sass/milestones/next.patch","labels_url":"https://api.github.com/repos/sass/node-sass/milestones/8/labels","id":1101326,"number":8,"title":"next.patch","description":"This milestone tracks issues and PRs for the upcoming patch release.\r\n\r\nThis is used for prioritisation and tracking release notes.","creator":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":54,"state":"open","created_at":"2015-05-08T03:41:59Z","updated_at":"2016-05-10T11:22:12Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-10T10:16:40Z","updated_at":"2016-05-10T11:22:12Z","closed_at":"2016-05-10T11:22:12Z","body":"Originally mentioned in https://github.com/sass/node-sass/issues/1095#issuecomment-176529490. This has been a known issue for a long time but has only recently come up.\r\n\r\n### Background\r\n\r\nMost watchers will niavely recompile all watched files when a watched file is modified. This is the case with tools like gulp and grunt.\r\n\r\n### Smart watching\r\n\r\nThe Node Sass watcher is a bit smarted. When the CLI watcher is started up it builds graph of Sass imports for the files it's watching. With this graph it can determine which files to recompile when a partial is changed. This is sometimes referred to as incremental compilation.\r\n\r\n### The bug\r\n\r\nCurrently this graph is only generated when the CLI watcher is started. This means the grpah isn't updated when files are added or deleted. This latter isn't much of problem, but the former results in new files not triggering recompiles.\r\n\r\nThe only way to register these files in the graph is to restarted the watcher."}}