{"action":"created","issue":{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/229","repository_url":"https://api.github.com/repos/raml-org/raml-js-parser-2","labels_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/229/comments","events_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/229/events","html_url":"https://github.com/raml-org/raml-js-parser-2/issues/229","id":155849227,"number":229,"title":"content method of fsResolver is illegally called for espn","user":{"login":"ddenisenko","id":14824966,"avatar_url":"https://avatars.githubusercontent.com/u/14824966?v=3","gravatar_id":"","url":"https://api.github.com/users/ddenisenko","html_url":"https://github.com/ddenisenko","followers_url":"https://api.github.com/users/ddenisenko/followers","following_url":"https://api.github.com/users/ddenisenko/following{/other_user}","gists_url":"https://api.github.com/users/ddenisenko/gists{/gist_id}","starred_url":"https://api.github.com/users/ddenisenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddenisenko/subscriptions","organizations_url":"https://api.github.com/users/ddenisenko/orgs","repos_url":"https://api.github.com/users/ddenisenko/repos","events_url":"https://api.github.com/users/ddenisenko/events{/privacy}","received_events_url":"https://api.github.com/users/ddenisenko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/labels/priority:critical","name":"priority:critical","color":"e11d21"},{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/labels/raml10-rc2","name":"raml10-rc2","color":"1d76db"}],"state":"closed","locked":false,"assignee":{"login":"ddenisenko","id":14824966,"avatar_url":"https://avatars.githubusercontent.com/u/14824966?v=3","gravatar_id":"","url":"https://api.github.com/users/ddenisenko","html_url":"https://github.com/ddenisenko","followers_url":"https://api.github.com/users/ddenisenko/followers","following_url":"https://api.github.com/users/ddenisenko/following{/other_user}","gists_url":"https://api.github.com/users/ddenisenko/gists{/gist_id}","starred_url":"https://api.github.com/users/ddenisenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddenisenko/subscriptions","organizations_url":"https://api.github.com/users/ddenisenko/orgs","repos_url":"https://api.github.com/users/ddenisenko/repos","events_url":"https://api.github.com/users/ddenisenko/events{/privacy}","received_events_url":"https://api.github.com/users/ddenisenko/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-19T22:25:24Z","updated_at":"2016-05-19T22:27:08Z","closed_at":"2016-05-19T22:27:08Z","body":"Steps:\r\n1) fsResolver for RAML parser:\r\n\r\nvar fsResolver = {\r\n    content : function(path) {\r\n        if (typeof path!=\"string\"){\r\n            path=\"\"+path;\r\n        }\r\n        if (!fs.existsSync(path)){\r\n            return null;\r\n        }\r\n        try {\r\n            return fs.readFileSync(path).toString();\r\n        } catch (e){\r\n            return null;\r\n        }\r\n    },\r\n\r\n    contentAsync : function(path){\r\n\r\n        return new Promise(function(resolve, reject) {\r\n\r\n            fs.readFile(path,function(err,data){\r\n                if(err!=null){\r\n                    return reject(err);\r\n                }\r\n                var content = data.toString();\r\n                resolve(content);\r\n            });\r\n        });\r\n    }\r\n}\r\n2) Import espn and launch parser with the resolver above.\r\n\r\nResult: content method of the resolver is being called, even though there is no reason to resolve any units synchronously"},"comment":{"url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/comments/220469607","html_url":"https://github.com/raml-org/raml-js-parser-2/issues/229#issuecomment-220469607","issue_url":"https://api.github.com/repos/raml-org/raml-js-parser-2/issues/229","id":220469607,"user":{"login":"ddenisenko","id":14824966,"avatar_url":"https://avatars.githubusercontent.com/u/14824966?v=3","gravatar_id":"","url":"https://api.github.com/users/ddenisenko","html_url":"https://github.com/ddenisenko","followers_url":"https://api.github.com/users/ddenisenko/followers","following_url":"https://api.github.com/users/ddenisenko/following{/other_user}","gists_url":"https://api.github.com/users/ddenisenko/gists{/gist_id}","starred_url":"https://api.github.com/users/ddenisenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddenisenko/subscriptions","organizations_url":"https://api.github.com/users/ddenisenko/orgs","repos_url":"https://api.github.com/users/ddenisenko/repos","events_url":"https://api.github.com/users/ddenisenko/events{/privacy}","received_events_url":"https://api.github.com/users/ddenisenko/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T22:27:08Z","updated_at":"2016-05-19T22:27:08Z","body":"Fixed."}}
{"actor":{"display_login":"ddenisenko"}}