{"action":"created","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/2165","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2165/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2165/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2165/events","html_url":"https://github.com/yarnpkg/yarn/issues/2165","id":193777793,"number":2165,"title":"yarn probably shouldn't cache packages resolved with a file path","user":{"login":"donaldpipowitch","id":1152805,"avatar_url":"https://avatars.githubusercontent.com/u/1152805?v=3","gravatar_id":"","url":"https://api.github.com/users/donaldpipowitch","html_url":"https://github.com/donaldpipowitch","followers_url":"https://api.github.com/users/donaldpipowitch/followers","following_url":"https://api.github.com/users/donaldpipowitch/following{/other_user}","gists_url":"https://api.github.com/users/donaldpipowitch/gists{/gist_id}","starred_url":"https://api.github.com/users/donaldpipowitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donaldpipowitch/subscriptions","organizations_url":"https://api.github.com/users/donaldpipowitch/orgs","repos_url":"https://api.github.com/users/donaldpipowitch/repos","events_url":"https://api.github.com/users/donaldpipowitch/events{/privacy}","received_events_url":"https://api.github.com/users/donaldpipowitch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-06T13:53:54Z","updated_at":"2016-12-26T09:43:51Z","closed_at":null,"body":"**Do you want to request a *feature* or report a *bug*?**\r\n\r\nI guess a _bug_.\r\n\r\n**What is the current behavior?**\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\n\r\nSay you have the following project structure:\r\n\r\n```\r\ncomponent-foo/\r\n└── package.json\r\n└── index.js\r\n\r\nyarn-test/\r\n└── package.json\r\n```\r\n\r\nWith the following files:\r\n\r\n`component-foo/package.json`:\r\n```\r\n{\r\n  \"name\": \"component-foo\",\r\n  \"version\": \"1.0.0\",\r\n  \"private\": true,\r\n  \"main\": \"index.js\"\r\n}\r\n```\r\n\r\n`component-foo/index.js`:\r\n```\r\nconsole.log('foo');\r\n```\r\n\r\n`yarn-test/package.json`:\r\n```\r\n{\r\n  \"name\": \"yarn-test\",\r\n  \"version\": \"1.0.0\",\r\n  \"private\": true,\r\n  \"dependencies\": {\r\n    \"component-foo\": \"file:../component-foo\"\r\n  }\r\n}\r\n```\r\n\r\nNow you run `$ yarn install` inside `yarn-test/` and `yarn-test/node_modules/component-foo/index.js` is:\r\n```\r\nconsole.log('foo');\r\n```\r\n\r\nNow remove `yarn-test/node_modules/` and `yarn-test/yarn.lock` and change `component-foo/index.js` to this:\r\n```\r\nconsole.log('bar');\r\n```\r\n\r\nNow you run `$ yarn install` inside `yarn-test/` again and `yarn-test/node_modules/component-foo/index.js` will be:\r\n```\r\nconsole.log('foo');\r\n```\r\n\r\nIt uses the cached version of `component-foo`, but `component-foo/index.js` has changed.\r\n\r\n**What is the expected behavior?**\r\n\r\nI'd expect that `yarn-test/node_modules/component-foo/index.js` should be this at the end:\r\n```\r\nconsole.log('bar');\r\n```\r\n\r\nMaybe packages installed with local paths like `file:../` shouldn't be cached at all, if we can't figure out, if they have changed.\r\n\r\n(FYI: It looks like npm doesn't cache them.)\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\n\r\n```\r\n$ node -v\r\nv6.9.1\r\n\r\n$ yarn -V\r\n0.18.0\r\n\r\nmacOS 10.12.1\r\n```"},"comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments/269192294","html_url":"https://github.com/yarnpkg/yarn/issues/2165#issuecomment-269192294","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/2165","id":269192294,"user":{"login":"hantuzun","id":2770895,"avatar_url":"https://avatars.githubusercontent.com/u/2770895?v=3","gravatar_id":"","url":"https://api.github.com/users/hantuzun","html_url":"https://github.com/hantuzun","followers_url":"https://api.github.com/users/hantuzun/followers","following_url":"https://api.github.com/users/hantuzun/following{/other_user}","gists_url":"https://api.github.com/users/hantuzun/gists{/gist_id}","starred_url":"https://api.github.com/users/hantuzun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hantuzun/subscriptions","organizations_url":"https://api.github.com/users/hantuzun/orgs","repos_url":"https://api.github.com/users/hantuzun/repos","events_url":"https://api.github.com/users/hantuzun/events{/privacy}","received_events_url":"https://api.github.com/users/hantuzun/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T09:43:51Z","updated_at":"2016-12-26T09:43:51Z","body":"@satya164 you're right. Although, I'm more inclined to the third approach would help if a dependency from network is modified intentionally."}}
{"actor":{"display_login":"hantuzun"}}