{"action":"created","issue":{"url":"https://api.github.com/repos/bodil/pulp/issues/136","labels_url":"https://api.github.com/repos/bodil/pulp/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/bodil/pulp/issues/136/comments","events_url":"https://api.github.com/repos/bodil/pulp/issues/136/events","html_url":"https://github.com/bodil/pulp/issues/136","id":123976033,"number":136,"title":"Pulp.Watch.action assumes the existence of …Path options.","user":{"login":"damncabbage","id":133028,"avatar_url":"https://avatars.githubusercontent.com/u/133028?v=3","gravatar_id":"","url":"https://api.github.com/users/damncabbage","html_url":"https://github.com/damncabbage","followers_url":"https://api.github.com/users/damncabbage/followers","following_url":"https://api.github.com/users/damncabbage/following{/other_user}","gists_url":"https://api.github.com/users/damncabbage/gists{/gist_id}","starred_url":"https://api.github.com/users/damncabbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damncabbage/subscriptions","organizations_url":"https://api.github.com/users/damncabbage/orgs","repos_url":"https://api.github.com/users/damncabbage/repos","events_url":"https://api.github.com/users/damncabbage/events{/privacy}","received_events_url":"https://api.github.com/users/damncabbage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-27T12:52:14Z","updated_at":"2015-12-27T13:07:20Z","closed_at":null,"body":"Bit of a weird one, and I'll leave it to your collective opinion as to whether it's worth tackling, but:\r\n\r\n* `Pulp.Watch.action` does a `getOption'` (non-optional getOption) for `srcPath`, `testPath` and `dependencyPath`, to give to whatever action is being watched.\r\n* These options aren't available to the `dep` or `init` commands.\r\n\r\nThe way I found this was with this odd command:\r\n```sh\r\n$ pulp --then 'say Done' dep install purescript-derp\r\nInternal error in Pulp.Args.Get: Missing default value for option: srcPath\r\nThis is a bug. Please report it.\r\n* ERROR: Internal error in Pulp.Args.Get: Missing default value for option: srcPath\r\nbower                        ENOTFOUND Package purescript-derp not found\r\n* ERROR: Subcommand terminated with exit code 1\r\n```\r\n\r\nFrom the user's point of view, the bug is that `--watch` is a command that can be used with everything, even when it really shouldn't be.\r\n\r\nFrom the Pulp dev's point of view, the bug is that `Pulp.Watch` is making assumptions it really shouldn't."},"comment":{"url":"https://api.github.com/repos/bodil/pulp/issues/comments/167408278","html_url":"https://github.com/bodil/pulp/issues/136#issuecomment-167408278","issue_url":"https://api.github.com/repos/bodil/pulp/issues/136","id":167408278,"user":{"login":"hdgarrood","id":1270186,"avatar_url":"https://avatars.githubusercontent.com/u/1270186?v=3","gravatar_id":"","url":"https://api.github.com/users/hdgarrood","html_url":"https://github.com/hdgarrood","followers_url":"https://api.github.com/users/hdgarrood/followers","following_url":"https://api.github.com/users/hdgarrood/following{/other_user}","gists_url":"https://api.github.com/users/hdgarrood/gists{/gist_id}","starred_url":"https://api.github.com/users/hdgarrood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdgarrood/subscriptions","organizations_url":"https://api.github.com/users/hdgarrood/orgs","repos_url":"https://api.github.com/users/hdgarrood/repos","events_url":"https://api.github.com/users/hdgarrood/events{/privacy}","received_events_url":"https://api.github.com/users/hdgarrood/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T13:07:20Z","updated_at":"2015-12-27T13:07:20Z","body":"Ah, of course. I do think this is worth fixing, although it's not immediately obvious how.\r\n\r\nThe Pulp.Args.Get stuff is kind of gross. I only allowed myself to write it because it was no less safe than the previous JS version, but I want to refactor it somehow eventually. One approach could be to extract all use of it in modules like Pulp.Build, Pulp.Test etc into one bit that gets run before anything happens, and then the real action could take a record of options or something.\r\n\r\nIt's not clear if that is relevant to this problem, but it might be useful context."}}