{"action":"created","issue":{"url":"https://api.github.com/repos/apiaryio/dredd/issues/381","repository_url":"https://api.github.com/repos/apiaryio/dredd","labels_url":"https://api.github.com/repos/apiaryio/dredd/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/dredd/issues/381/comments","events_url":"https://api.github.com/repos/apiaryio/dredd/issues/381/events","html_url":"https://github.com/apiaryio/dredd/issues/381","id":136346890,"number":381,"title":"Dredd fails after \"ExtendElement must be composed from Elements of same type\" warning","user":{"login":"amuino","id":47512,"avatar_url":"https://avatars.githubusercontent.com/u/47512?v=3","gravatar_id":"","url":"https://api.github.com/users/amuino","html_url":"https://github.com/amuino","followers_url":"https://api.github.com/users/amuino/followers","following_url":"https://api.github.com/users/amuino/following{/other_user}","gists_url":"https://api.github.com/users/amuino/gists{/gist_id}","starred_url":"https://api.github.com/users/amuino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amuino/subscriptions","organizations_url":"https://api.github.com/users/amuino/orgs","repos_url":"https://api.github.com/users/amuino/repos","events_url":"https://api.github.com/users/amuino/events{/privacy}","received_events_url":"https://api.github.com/users/amuino/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apiaryio/dredd/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/apiaryio/dredd/labels/Drafter","name":"Drafter","color":"6C7887"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-25T10:37:29Z","updated_at":"2016-04-04T08:55:24Z","closed_at":null,"body":"When parsing our blueprint, which uses `Include` in MSON Data Structures, we get the following output:\r\n\r\n```\r\n$ dredd\r\nConfiguration dredd.yml found, ignoring other arguments.\r\nStarting server with command: false\r\nWaiting 0 seconds for server command to start...\r\nwarn: Parser warning in file 'doc/api/public.apib.md': (4) ExtendElement must be composed from Elements of same type\r\n/Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/node_modules/blueprint-transactions/lib/blueprint-ast-to-runtime.js:25\r\n  if (blueprintAst['name'] !== \"\") {\r\n                  ^\r\n\r\nTypeError: Cannot read property 'name' of undefined\r\n  at blueprintAstToRuntime (/Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/node_modules/blueprint-transactions/lib/blueprint-ast-to-runtime.js:25:19)\r\n  at Object.module.exports.compile (/Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/node_modules/blueprint-transactions/lib/blueprint-transactions.js:11:14)\r\n  at Dredd.compileTransactions (/Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/lib/dredd.js:285:44)\r\n  at /Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/lib/dredd.js:117:26\r\n  at /Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/lib/dredd.js:272:16\r\n  at done (/Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/node_modules/async/lib/async.js:132:19)\r\n  at /Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/node_modules/async/lib/async.js:32:16\r\n  at /Users/amuino/.nvm/versions/node/v5.7.0/lib/node_modules/dredd/lib/dredd.js:245:18\r\n```\r\n\r\nInitial debugging points to either `drafter` or `protagonist` (or both) as the culprit.\r\n\r\nDrafter detects [an error on the blueprint](https://github.com/apiaryio/drafter/blob/8dd33e76654901a7ea076fbd667fdef5b9962b27/src/refract/Element.cc#L182) but it is reported to dredd as successful parse with warnings. However, the parse result has no elements to process:\r\n\r\n```{ _version: '2.2',\r\n  warnings:\r\n   [ { code: 4,\r\n       message: 'ExtendElement must be composed from Elements of same type',\r\n       location: [] } ] }```\r\n\r\n... which ends in the error reported above:\r\n```\r\n  if (blueprintAst['name'] !== \"\") {\r\n                  ^\r\n\r\nTypeError: Cannot read property 'name' of undefined\r\n```"},"comment":{"url":"https://api.github.com/repos/apiaryio/dredd/issues/comments/205200327","html_url":"https://github.com/apiaryio/dredd/issues/381#issuecomment-205200327","issue_url":"https://api.github.com/repos/apiaryio/dredd/issues/381","id":205200327,"user":{"login":"honzajavorek","id":283441,"avatar_url":"https://avatars.githubusercontent.com/u/283441?v=3","gravatar_id":"","url":"https://api.github.com/users/honzajavorek","html_url":"https://github.com/honzajavorek","followers_url":"https://api.github.com/users/honzajavorek/followers","following_url":"https://api.github.com/users/honzajavorek/following{/other_user}","gists_url":"https://api.github.com/users/honzajavorek/gists{/gist_id}","starred_url":"https://api.github.com/users/honzajavorek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honzajavorek/subscriptions","organizations_url":"https://api.github.com/users/honzajavorek/orgs","repos_url":"https://api.github.com/users/honzajavorek/repos","events_url":"https://api.github.com/users/honzajavorek/events{/privacy}","received_events_url":"https://api.github.com/users/honzajavorek/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T08:55:24Z","updated_at":"2016-04-04T08:55:24Z","body":"And I'm sorry for the trouble, really. I see it's not a good first time experience to run into a bug like this :disappointed: [MSON](https://github.com/apiaryio/mson) (a.k.a. Attributes) still isn't completely bug-free and officially released as a production-ready technology in all the tooling around [API Blueprint](https://apiblueprint.org/). In [Apiary](http://apiary.io/) we're working around the clock to get it polished on all fronts! :triumph: "}}