{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/42576","labels_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42576/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42576/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42576/events","html_url":"https://github.com/Homebrew/homebrew/pull/42576","id":99512103,"number":42576,"title":"languages: flag missing dependency requirement","user":{"login":"DomT4","id":6998367,"avatar_url":"https://avatars.githubusercontent.com/u/6998367?v=3","gravatar_id":"","url":"https://api.github.com/users/DomT4","html_url":"https://github.com/DomT4","followers_url":"https://api.github.com/users/DomT4/followers","following_url":"https://api.github.com/users/DomT4/following{/other_user}","gists_url":"https://api.github.com/users/DomT4/gists{/gist_id}","starred_url":"https://api.github.com/users/DomT4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DomT4/subscriptions","organizations_url":"https://api.github.com/users/DomT4/orgs","repos_url":"https://api.github.com/users/DomT4/repos","events_url":"https://api.github.com/users/DomT4/events{/privacy}","received_events_url":"https://api.github.com/users/DomT4/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Homebrew/homebrew/labels/maintainer%20feedback","name":"maintainer feedback","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"DomT4","id":6998367,"avatar_url":"https://avatars.githubusercontent.com/u/6998367?v=3","gravatar_id":"","url":"https://api.github.com/users/DomT4","html_url":"https://github.com/DomT4","followers_url":"https://api.github.com/users/DomT4/followers","following_url":"https://api.github.com/users/DomT4/following{/other_user}","gists_url":"https://api.github.com/users/DomT4/gists{/gist_id}","starred_url":"https://api.github.com/users/DomT4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DomT4/subscriptions","organizations_url":"https://api.github.com/users/DomT4/orgs","repos_url":"https://api.github.com/users/DomT4/repos","events_url":"https://api.github.com/users/DomT4/events{/privacy}","received_events_url":"https://api.github.com/users/DomT4/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-06T19:57:33Z","updated_at":"2015-12-23T13:57:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/42576","html_url":"https://github.com/Homebrew/homebrew/pull/42576","diff_url":"https://github.com/Homebrew/homebrew/pull/42576.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/42576.patch"},"body":"I'm aware this is probably more complicated than it needs to be and Xu is likely to see this, drive by and go *\"Or you can compress all of this down to these two easy lines\"* :stuck_out_tongue_winking_eye:.\r\n\r\nThis is in part designed to handle situations described in #42273 where we tell someone to install a special dependency, but because we (rightly, IMO) resolve special dependencies first users can end up being told to execute a command on a tool that isn't yet installed and isn't immediately obvious how to install it.\r\n\r\nIn the situation raised there, with the `sile` formula people are being told to `luarocks install xyz` but we hadn't installed Lua for them first, so they just get a `command not found: luarocks` message. Perhaps it should be obvious enough how to install said tools by looking at the formula's dependencies, but it's not a huge burden on us to make life easier than that.\r\n\r\nEssentially, when `lua` isn't already installed this changes the current message to:\r\n\r\n```\r\nsile: Unsatisfied dependency: lpeg\r\nHomebrew does not provide special Lua dependencies; install with:\r\n  luarocks-5.2 install lpeg\r\nYou may need to:\r\n  brew install lua\r\nError: Unsatisfied requirements failed this build.\r\n```\r\n\r\nIf Lua is installed but the special dependency isn't the message stays at:\r\n\r\n```\r\nsile: Unsatisfied dependency: lpeg\r\nHomebrew does not provide special Lua dependencies; install with:\r\n  luarocks-5.2 install lpeg\r\nError: Unsatisfied requirements failed this build.\r\n```\r\n\r\nThe only thing it won't flag that doesn't already come shipped with OS X is the `rbx` dependency as there's no way to install that via `brew`. It won't flag Perl/Python/Ruby stuff because `/usr/bin/env` returns the exit code `127` if a tool doesn't exist, but the tools themselves return an exit code of `1` or `2` if the tool exists but the special dependency isn't installed.\r\n\r\nI need to check a few of the remaining ones, but `127` should be a safe check as it's *supposed* to be reserved for \"command not found\"."},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments/166900989","html_url":"https://github.com/Homebrew/homebrew/pull/42576#issuecomment-166900989","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42576","id":166900989,"user":{"login":"DomT4","id":6998367,"avatar_url":"https://avatars.githubusercontent.com/u/6998367?v=3","gravatar_id":"","url":"https://api.github.com/users/DomT4","html_url":"https://github.com/DomT4","followers_url":"https://api.github.com/users/DomT4/followers","following_url":"https://api.github.com/users/DomT4/following{/other_user}","gists_url":"https://api.github.com/users/DomT4/gists{/gist_id}","starred_url":"https://api.github.com/users/DomT4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DomT4/subscriptions","organizations_url":"https://api.github.com/users/DomT4/orgs","repos_url":"https://api.github.com/users/DomT4/repos","events_url":"https://api.github.com/users/DomT4/events{/privacy}","received_events_url":"https://api.github.com/users/DomT4/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T13:57:39Z","updated_at":"2015-12-23T13:57:39Z","body":"It's on my post-Christmas list."}}