Skip to content

Fix git checkout bug and improve dependency swapping#191

Merged
aomarks merged 2 commits intomasterfrom
fixswap
Sep 11, 2020
Merged

Fix git checkout bug and improve dependency swapping#191
aomarks merged 2 commits intomasterfrom
fixswap

Conversation

@aomarks
Copy link
Member

@aomarks aomarks commented Sep 10, 2020

Fixes a bug with the new git dependency swapping feature, and improves temp dir caching behavior.

  1. Fix error in the way we checked out git refs.

  2. Always query the origin git repo and ask it to resolve refs to hashes. Use this SHA as the hash/temp directory name so that we never fall behind the origin.

  3. Use the actual dependency versions to determine the identity of an NPM install directory, instead of the label.

  4. Write a special file to the temp directory when installation succeeds. If the next time, we find it's not there, we assume the installation failed and re-install from scratch.

  5. Simplify some code.

Fixes #190

1. Fix error in the way we checked out git refs.

2. Always query the origin git repo and ask it to resolve
   refs to hashes. Use this SHA as the hash/temp directory
   name so that we never fall behind the origin.

3. Use the actual dependency versions to determine the identity
   of an NPM install directory, instead of the label.

4. Simplify some code.
Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the numbered fixes you described in the code, although I'm probably not the best equipped to catch bugs in the change, so feel free to wait for cdata, either way.

@aomarks aomarks merged commit 5a742c2 into master Sep 11, 2020
@aomarks aomarks deleted the fixswap branch September 11, 2020 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smarter dependency swapping temp dir invalidation

3 participants