{"action":"created","issue":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2832","repository_url":"https://api.github.com/repos/BuckleScript/bucklescript","labels_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2832/labels{/name}","comments_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2832/comments","events_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2832/events","html_url":"https://github.com/BuckleScript/bucklescript/issues/2832","id":326383780,"number":2832,"title":"bsb compiler crashes (exit status 2) with: Fatal error: exception Invalid_argument(\"index out of bounds\")","user":{"login":"dvisztempacct","id":37460069,"avatar_url":"https://avatars3.githubusercontent.com/u/37460069?v=4","gravatar_id":"","url":"https://api.github.com/users/dvisztempacct","html_url":"https://github.com/dvisztempacct","followers_url":"https://api.github.com/users/dvisztempacct/followers","following_url":"https://api.github.com/users/dvisztempacct/following{/other_user}","gists_url":"https://api.github.com/users/dvisztempacct/gists{/gist_id}","starred_url":"https://api.github.com/users/dvisztempacct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvisztempacct/subscriptions","organizations_url":"https://api.github.com/users/dvisztempacct/orgs","repos_url":"https://api.github.com/users/dvisztempacct/repos","events_url":"https://api.github.com/users/dvisztempacct/events{/privacy}","received_events_url":"https://api.github.com/users/dvisztempacct/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T05:13:40Z","updated_at":"2018-05-25T05:37:42Z","closed_at":null,"author_association":"NONE","body":"This occurs with release 3.1.4 as well as master e6c7a4b2dcd84435e838b1b26207800d445a0cf7 (`bsb -v` says `3.2.0`)\r\n\r\n```\r\ndonviszneki@Dons-MacBook-Pro ~/bsb-bug-0$ cat bsconfig.json\r\n{\r\n  \"name\": \"bsb-bug-0\",\r\n  \"version\": \"0.1.0\",\r\n  \"sources\": {\r\n    \"dir\" : \"src\",\r\n    \"subdirs\" : true\r\n  },\r\n  \"package-specs\": {\r\n    \"module\": \"commonjs\",\r\n    \"in-source\": true\r\n  },\r\n  \"suffix\": \".bs.js\",\r\n  \"bs-dependencies\": [\r\n      // add your bs-dependencies here\r\n  ],\r\n  \"warnings\": {\r\n    \"error\" : \"+101\"\r\n  },\r\n  \"refmt\": 3\r\n}\r\ndonviszneki@Dons-MacBook-Pro ~/bsb-bug-0$ ls src\r\nprotobufs.re\r\ndonviszneki@Dons-MacBook-Pro ~/bsb-bug-0$ cat src/protobufs.re\r\n[@bs.deriving abstract]\r\ntype qux = {\r\n  [@bs.as \"foo\"]\r\n  bar: int,\r\n};\r\n[@module] external baz : qux = \"\";\r\ndonviszneki@Dons-MacBook-Pro ~/bsb-bug-0$ bsb -clean-world\r\nCleaning... 2 files.\r\ndonviszneki@Dons-MacBook-Pro ~/bsb-bug-0$ bsb -make-world\r\nninja: Entering directory `lib/bs'\r\n[2/2] Building src/protobufs.mlast.d\r\n[1/1] Building src/protobufs.cmj\r\nFAILED: src/protobufs.cmj /Users/donviszneki/bsb-bug-0/src/protobufs.bs.js src/protobufs.cmi\r\n/Users/donviszneki/bucklescript/lib/bsc.exe -bs-package-name bsb-bug-0  -bs-package-output commonjs:src -bs-assume-no-mli -bs-no-builtin-ppx-ml -bs-no-implicit-include  -I src  -w -30-40+6+7+27+32..39+44+45+101 -warn-error +101 -bs-suffix -nostdlib -I '/Users/donviszneki/bsb-bug-0/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -bs-re-out -bs-super-errors -o src/protobufs.cmj -c  src/protobufs.mlast\r\nFatal error: exception Invalid_argument(\"index out of bounds\")\r\nninja: build stopped: subcommand failed.\r\n```"},"comment":{"url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/comments/391946816","html_url":"https://github.com/BuckleScript/bucklescript/issues/2832#issuecomment-391946816","issue_url":"https://api.github.com/repos/BuckleScript/bucklescript/issues/2832","id":391946816,"user":{"login":"dvisztempacct","id":37460069,"avatar_url":"https://avatars3.githubusercontent.com/u/37460069?v=4","gravatar_id":"","url":"https://api.github.com/users/dvisztempacct","html_url":"https://github.com/dvisztempacct","followers_url":"https://api.github.com/users/dvisztempacct/followers","following_url":"https://api.github.com/users/dvisztempacct/following{/other_user}","gists_url":"https://api.github.com/users/dvisztempacct/gists{/gist_id}","starred_url":"https://api.github.com/users/dvisztempacct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvisztempacct/subscriptions","organizations_url":"https://api.github.com/users/dvisztempacct/orgs","repos_url":"https://api.github.com/users/dvisztempacct/repos","events_url":"https://api.github.com/users/dvisztempacct/events{/privacy}","received_events_url":"https://api.github.com/users/dvisztempacct/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T05:37:42Z","updated_at":"2018-05-25T05:37:42Z","author_association":"NONE","body":"It looks like the problem is just the `[@thing]` being invalid. The following source code triggers the same compiler error:\r\n\r\n```\r\n[@foo \"bar\"] external baz : int = \"\";\r\n```"}}
{"actor":{"display_login":"dvisztempacct"}}