{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/glslang/issues/425","repository_url":"https://api.github.com/repos/KhronosGroup/glslang","labels_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/425/comments","events_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/425/events","html_url":"https://github.com/KhronosGroup/glslang/issues/425","id":168602211,"number":425,"title":"Files with a UTF-8 BOM marker confuse the #version check","user":{"login":"DeanoC","id":932363,"avatar_url":"https://avatars.githubusercontent.com/u/932363?v=3","gravatar_id":"","url":"https://api.github.com/users/DeanoC","html_url":"https://github.com/DeanoC","followers_url":"https://api.github.com/users/DeanoC/followers","following_url":"https://api.github.com/users/DeanoC/following{/other_user}","gists_url":"https://api.github.com/users/DeanoC/gists{/gist_id}","starred_url":"https://api.github.com/users/DeanoC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeanoC/subscriptions","organizations_url":"https://api.github.com/users/DeanoC/orgs","repos_url":"https://api.github.com/users/DeanoC/repos","events_url":"https://api.github.com/users/DeanoC/events{/privacy}","received_events_url":"https://api.github.com/users/DeanoC/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KhronosGroup/glslang/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/KhronosGroup/glslang/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-01T09:20:14Z","updated_at":"2016-08-01T21:19:21Z","closed_at":null,"body":"The #version check looks at the first byte of a file, if the file has a UTF-8 BOM marker this fails as # is not the first byte (it is the first character though...).\r\n\r\nWhilst it may be that it shouldn't handle BOM files, would be nice to fire a warning at least as its largely a hidden error (most editors will hide the BOM so its correct to visual inspection)\r\n"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/glslang/issues/comments/236711116","html_url":"https://github.com/KhronosGroup/glslang/issues/425#issuecomment-236711116","issue_url":"https://api.github.com/repos/KhronosGroup/glslang/issues/425","id":236711116,"user":{"login":"johnkslang","id":5607714,"avatar_url":"https://avatars.githubusercontent.com/u/5607714?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkslang","html_url":"https://github.com/johnkslang","followers_url":"https://api.github.com/users/johnkslang/followers","following_url":"https://api.github.com/users/johnkslang/following{/other_user}","gists_url":"https://api.github.com/users/johnkslang/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkslang/subscriptions","organizations_url":"https://api.github.com/users/johnkslang/orgs","repos_url":"https://api.github.com/users/johnkslang/repos","events_url":"https://api.github.com/users/johnkslang/events{/privacy}","received_events_url":"https://api.github.com/users/johnkslang/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T21:19:21Z","updated_at":"2016-08-01T21:19:21Z","body":"> The #version check looks at the first byte\r\n\r\nI don't think that is true:\r\n\r\n - The #version finder skips initial characters to find the first #version, it does not require # as the first byte.\r\n - The #version semantics checking enforces ES vs. desktop rules, which differ, but neither requires # in the first byte.\r\n\r\n> if the file has a UTF-8 BOM marker this fails \r\n\r\nIsn't it correct to fail?\r\n\r\nNote there is no formal specification of processing \"a file\", and that is absent in the programmatic (use through API) use of glslang.  It is just a convenience provided by the standalone command-line version that turns a file into a text string. Maybe you want to provide an enhancement to the standalone tool that processes BOM files the way you think is correct?\r\n"}}
{"actor":{"display_login":"johnkslang"}}