{"action":"created","issue":{"url":"https://api.github.com/repos/rails/sprockets-rails/issues/387","repository_url":"https://api.github.com/repos/rails/sprockets-rails","labels_url":"https://api.github.com/repos/rails/sprockets-rails/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/rails/sprockets-rails/issues/387/comments","events_url":"https://api.github.com/repos/rails/sprockets-rails/issues/387/events","html_url":"https://github.com/rails/sprockets-rails/issues/387","id":202598219,"number":387,"title":"Question: Why is Rails.env part a resolving dependency?","user":{"login":"nambrot","id":571810,"avatar_url":"https://avatars2.githubusercontent.com/u/571810?v=4","gravatar_id":"","url":"https://api.github.com/users/nambrot","html_url":"https://github.com/nambrot","followers_url":"https://api.github.com/users/nambrot/followers","following_url":"https://api.github.com/users/nambrot/following{/other_user}","gists_url":"https://api.github.com/users/nambrot/gists{/gist_id}","starred_url":"https://api.github.com/users/nambrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nambrot/subscriptions","organizations_url":"https://api.github.com/users/nambrot/orgs","repos_url":"https://api.github.com/users/nambrot/repos","events_url":"https://api.github.com/users/nambrot/events{/privacy}","received_events_url":"https://api.github.com/users/nambrot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-01-23T17:26:09Z","updated_at":"2018-04-21T21:03:44Z","closed_at":null,"author_association":"NONE","body":"I'm currently trying to figure out why Rails.env needs to be a resolving dependency for sprockets fingerprints? As far as I can see (and imo according to the docs), fingerprinting based upon the file contents should be sufficient? What i'm trying to get to is to run `assets:precompile` independent of the environment im running it in"},"comment":{"url":"https://api.github.com/repos/rails/sprockets-rails/issues/comments/383330618","html_url":"https://github.com/rails/sprockets-rails/issues/387#issuecomment-383330618","issue_url":"https://api.github.com/repos/rails/sprockets-rails/issues/387","id":383330618,"user":{"login":"mike-stewart","id":2521245,"avatar_url":"https://avatars1.githubusercontent.com/u/2521245?v=4","gravatar_id":"","url":"https://api.github.com/users/mike-stewart","html_url":"https://github.com/mike-stewart","followers_url":"https://api.github.com/users/mike-stewart/followers","following_url":"https://api.github.com/users/mike-stewart/following{/other_user}","gists_url":"https://api.github.com/users/mike-stewart/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-stewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-stewart/subscriptions","organizations_url":"https://api.github.com/users/mike-stewart/orgs","repos_url":"https://api.github.com/users/mike-stewart/repos","events_url":"https://api.github.com/users/mike-stewart/events{/privacy}","received_events_url":"https://api.github.com/users/mike-stewart/received_events","type":"User","site_admin":false},"created_at":"2018-04-21T21:03:44Z","updated_at":"2018-04-21T21:03:44Z","author_association":"NONE","body":"I'm running into this same problem on Sprockets 2.x. I realize this is an old version, so if the behaviour has changed in 3.x please let me know.\r\n\r\nI am running asset precompile in a Docker build, and looking to re-use this docker image across multiple Rails environments that use the same asset configuration and dependencies (actually identical). However, it seems that changing the Rails.env string will change the digest value in the filename.\r\n\r\nIt looks like the Rails.env string is used to invalidate the cache here in 2.x: https://github.com/rails/sprockets-rails/blob/2.x/lib/sprockets/railtie.rb#L91-L97\r\n\r\nAnd it's added as a dependency in 3.x here: https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/railtie.rb#L146\r\n\r\nIs there some way to disable this behaviour in 2.x, so that the Rails.env string is not a dependency? Or does upgrading to 3.x solve this problem?"}}
{"actor":{"display_login":"mike-stewart"}}