yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Doesn't refresh git repo

Open ronag opened this issue 10 years ago • 13 comments

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Doesn't re-fetch git repo if branch revision has changed.

If the current behavior is a bug, please provide the steps to reproduce.

"mydep": "github:myrepo/mydep#mybranch" "mydep2": "github:myrepo/mydep2"

yarn upgrade yarn

What is the expected behavior?

Check if the correct revision is local and otherwise fetch the latest

Please mention your node.js, yarn and operating system version.

OSX Sierra yarn 15.1

ronag avatar Oct 17 '16 20:10 ronag

Possibly related to #1017.

markstos avatar Oct 17 '16 20:10 markstos

I'm seeing this even when using hashes of commits, and explicitly updating package.json to a newer hash.

E.g., first yarn install with:

"dependencies": {
  "module": "user/module#deadbeef"
}

Then update to:

"dependencies": {
  "module": "user/module#badf00d"
}

yarn install again. yarn.lock will say that it's now at badf00d, but the installed version will still be deadbeef.

If you force reinstallation with yarn cache clean && rm -rf node_modules && yarn install, then the correct version will be installed.

jfirebaugh avatar Oct 26 '16 01:10 jfirebaugh

I was hoping that this might have been fixed by #1641, but I tested yarn 0.17.3 and the bug still occurs.

jfirebaugh avatar Nov 17 '16 16:11 jfirebaugh

Should be fixed now #2074

bestander avatar Jan 14 '17 19:01 bestander

I get the same issue on OSX High Sierra v10.13.4, yarn 1.6.0

liywjl avatar May 09 '18 14:05 liywjl

i am still getting this issue on v1.17.3. yarn cache clean && rm -rf node_modules && yarn install did not work

shorif2000 avatar Aug 16 '19 20:08 shorif2000

same issue on v1.22.4

faxioman avatar May 24 '20 13:05 faxioman

Same issue on v1.22.10

kaligrafy avatar Nov 24 '20 20:11 kaligrafy

@faxioman @kaligrafy There are two versions of the issue described here whic are different:

  1. Failure to update with a Git branch when the content of the branch changes but the URL in package.json / yarn.lock does not.
  2. Failure to update when an explicit Git SHA changes in package.json/yarn.lock

Please clarify which case you are still reproducing. I think these two cases should be split into separate issues, each with a clear title. Case 2 described by @jfirebaugh feels like an clear bug that seems easier to fix.

markstos avatar Nov 25 '20 15:11 markstos

  1. Failure to update with a git hash in a fork. It just fetches the original repo and not the fork with a specific hash.

kaligrafy avatar Nov 25 '20 15:11 kaligrafy

Sorry @markstos but I can’t remember the problem I was facing🤷‍♂️

faxioman avatar Nov 25 '20 20:11 faxioman

facing 1. on yarn 1.22.19

Git private repo branch dependency not refreshed to branch HEAD

shawnwang-avl avatar Dec 02 '22 06:12 shawnwang-avl

Following this worked https://github.com/yarnpkg/yarn/issues/1573#issuecomment-369557725

shawnwang-avl avatar Dec 02 '22 06:12 shawnwang-avl