{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/2886","repository_url":"https://api.github.com/repos/bbatsov/rubocop","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2886/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2886/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2886/events","html_url":"https://github.com/bbatsov/rubocop/issues/2886","id":136171970,"number":2886,"title":"Cache does not depend on content of Cops","user":{"login":"ptarjan","id":40143,"avatar_url":"https://avatars.githubusercontent.com/u/40143?v=3","gravatar_id":"","url":"https://api.github.com/users/ptarjan","html_url":"https://github.com/ptarjan","followers_url":"https://api.github.com/users/ptarjan/followers","following_url":"https://api.github.com/users/ptarjan/following{/other_user}","gists_url":"https://api.github.com/users/ptarjan/gists{/gist_id}","starred_url":"https://api.github.com/users/ptarjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptarjan/subscriptions","organizations_url":"https://api.github.com/users/ptarjan/orgs","repos_url":"https://api.github.com/users/ptarjan/repos","events_url":"https://api.github.com/users/ptarjan/events{/privacy}","received_events_url":"https://api.github.com/users/ptarjan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-24T20:04:14Z","updated_at":"2016-02-25T19:43:58Z","closed_at":null,"body":"If you run `rubocop` on a file, then change a cop to do something different, then re-run `rubocop` it will just return the previous result. `-C false` fixes it, but that is pretty bizarre and unexpected for cop authors. Even worse, cop changes in CI will continue running old versions until the files are touched.\r\n\r\nI don't know what the current cache key is, but can we include a SHA of the cops that run too in there?"},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/188948055","html_url":"https://github.com/bbatsov/rubocop/issues/2886#issuecomment-188948055","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2886","id":188948055,"user":{"login":"ptarjan","id":40143,"avatar_url":"https://avatars.githubusercontent.com/u/40143?v=3","gravatar_id":"","url":"https://api.github.com/users/ptarjan","html_url":"https://github.com/ptarjan","followers_url":"https://api.github.com/users/ptarjan/followers","following_url":"https://api.github.com/users/ptarjan/following{/other_user}","gists_url":"https://api.github.com/users/ptarjan/gists{/gist_id}","starred_url":"https://api.github.com/users/ptarjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptarjan/subscriptions","organizations_url":"https://api.github.com/users/ptarjan/orgs","repos_url":"https://api.github.com/users/ptarjan/repos","events_url":"https://api.github.com/users/ptarjan/events{/privacy}","received_events_url":"https://api.github.com/users/ptarjan/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T19:43:58Z","updated_at":"2016-02-25T19:43:58Z","body":"I have a top level 'require:' in the rubocop.yml. That file has many require_relative for ruby files which have the actual cops themselves. If there are any changes to the included Cops, they don't bust the cache.\n\nPaul\n\nSent from my iPhone\n\n> On Feb 25, 2016, at 11:39 AM, Alex Dowad <notifications@github.com> wrote:\n> \n> @ptarjan Are you talking about changing the source code of a custom com, or the YAML configuration?\n> \n> All files in the entire RC source directory are hashed and those hashes are mixed in to the overall cache key, so changes to the RC source itself bust the cache. But if the source code for your custom cop is somewhere else, it wouldn't go into the cache key.\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}