{"action":"created","issue":{"url":"https://api.github.com/repos/makojs/core/issues/4","labels_url":"https://api.github.com/repos/makojs/core/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/makojs/core/issues/4/comments","events_url":"https://api.github.com/repos/makojs/core/issues/4/events","html_url":"https://github.com/makojs/core/issues/4","id":119609808,"number":4,"title":"running mako twice using the same tree is problematic when changing file.type","user":{"login":"matthewmueller","id":170299,"avatar_url":"https://avatars.githubusercontent.com/u/170299?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewmueller","html_url":"https://github.com/matthewmueller","followers_url":"https://api.github.com/users/matthewmueller/followers","following_url":"https://api.github.com/users/matthewmueller/following{/other_user}","gists_url":"https://api.github.com/users/matthewmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewmueller/subscriptions","organizations_url":"https://api.github.com/users/matthewmueller/orgs","repos_url":"https://api.github.com/users/matthewmueller/repos","events_url":"https://api.github.com/users/matthewmueller/events{/privacy}","received_events_url":"https://api.github.com/users/matthewmueller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-30T23:58:42Z","updated_at":"2015-12-16T16:39:34Z","closed_at":"2015-12-02T06:13:53Z","body":"the following code is problematic:\r\n\r\n```\r\nvar mako = Mako()\r\n  .use(jade())\r\n\r\nmako\r\n  .build('index.jade')\r\n  .then(noop)\r\n\r\nfile = mako.tree.getFile('index.jade')\r\nfile.analyzed = false\r\n\r\nmako\r\n  .build('index.jade')\r\n  .then(noop)\r\n```\r\n\r\nbecause the `file.type` gets changed from `jade` to `html` in the jade plugin and the hooks are dependent on `file.type`. so after you compile it once, the `file.type` has changed and so it won't be recompiled when that file changes again. this makes doing file watchers pretty difficult. \r\n\r\ncould be thinking about this in the wrong way though."},"comment":{"url":"https://api.github.com/repos/makojs/core/issues/comments/165169460","html_url":"https://github.com/makojs/core/issues/4#issuecomment-165169460","issue_url":"https://api.github.com/repos/makojs/core/issues/4","id":165169460,"user":{"login":"matthewmueller","id":170299,"avatar_url":"https://avatars.githubusercontent.com/u/170299?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewmueller","html_url":"https://github.com/matthewmueller","followers_url":"https://api.github.com/users/matthewmueller/followers","following_url":"https://api.github.com/users/matthewmueller/following{/other_user}","gists_url":"https://api.github.com/users/matthewmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewmueller/subscriptions","organizations_url":"https://api.github.com/users/matthewmueller/orgs","repos_url":"https://api.github.com/users/matthewmueller/repos","events_url":"https://api.github.com/users/matthewmueller/events{/privacy}","received_events_url":"https://api.github.com/users/matthewmueller/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T16:39:34Z","updated_at":"2015-12-16T16:39:34Z","body":"oh yah, i guess if it wasn't explicitly marked dirty it wouldn't get picked up on a second rebuild. i think the  changes you made should fix it :-)"}}