Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core)!: devirtualize descriptor in tryWorkspaceByDescriptor #2675

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Apr 2, 2021

What's the problem this PR addresses?

Project.tryWorkspaceByDescriptor doesn't match on virtual descriptors which is unexpected as tryWorkspaceByLocator does

Extracted from #2338

How did you fix it?

Make tryWorkspaceByDescriptor devirtualize the descriptor before checking if it matches a workspace

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz requested a review from arcanis as a code owner April 2, 2021 15:47
@arcanis arcanis merged commit e64b285 into master Apr 7, 2021
@arcanis arcanis deleted the merceyz/workspace-by-virtual-descriptor branch April 7, 2021 08:13
arcanis added a commit that referenced this pull request May 16, 2021
…talls (#2688)

* Fixes external soft links detection in case when they use peer deps

* Ignores self-references during compatibility checks

* Run compatiblity checks on real locators

* Take into account cases when resovleVirtual does not work

* Adds `nmHardlinks` config option to utilize hardlinks for duplicatee locations

* Adds nmHardlinks integration test

* Fixes nmHoistingLimits for portals

* Chore: remove unused readFile import

* Chorre: run version check

* Update cond

* Removes extra version file

* Add a test to check that hoisting limits do not break portals

* Implements hoistability check for the case when multiple portal targets sued from the same parent

* Small cleanups

* Return back relativeDepCwd

* Simplifies handling of nmHardlinks option change across installs

* Checks if dependency is actually reachable

* fix(node-modules): prefer binaries from calling workspace (#2703)

* Prefer bin in calling workspace

* Add integration test

* Bump versions

* Update test

* fix(docs): fix typos for the YN0004 error code (#2706)

* fix(core): handle escaped slash after scope in LegacyMigrationResolver (#2696)

* docs: remove yarnUpgradePath (#2690)

* fix(dlx): only set enableGlobalCache to true if it's false in the project (#2677)

* fix(core): devirtualize descriptor in tryWorkspaceByDescriptor (#2675)

* perf(pnp): optimize `findPackageLocator` (#2673)

* perf(pnp): optimize findPackageLocator

* chore: versions

* Bumps TypeScript (#2676)

* Bumps TypeScript

* Fixes sdk

* Improved http errors (reportExtra) (#2707)

* Improves http errors

* Improves the http errors

* Fixes package.json

* Fixes tests

* Fixes imports

* Removes invalid grammar line

* Rename nmHardlinks -> nmMode

* Implements getting crc for files inside archives

* Reduces node_modules size in hardlinks mode due to linking files having same content

* Makes .yarn-state.yml deterministic for the hardlinks mode

* Fixes condition to update hash

* Removes CAS code for now

* Adds basic support for local and global CAS

* Uses sha1 for hashing CAS

* Uses CAS only in global mode

* Fixes strange type errors

* Safe CAS files writing

* Implements faster repetitive CAS

* Speed ups cold CAS by combining checksuming and file reading from archives

* Removes cas directory on `yarn cache clean --mirror`

* Adds integration test for nmMode: cas

* Add workarounds description for YN0071

* Refactors copyFilePromise into separate function

* Simplifies directory copying implementation by decoupling entry reading code

* Speedups a bit cold and hot CAS

* Uses hardlinks for benchmarks

* Autorecovers CAS store files with wrong checksums on install

* Adds test to check that store is recovered on reinstall

* Uses the same chmod optimization both for CAS and non-CAS modes

* Fixes bin symlinks chmodding

* Merges with latest masterr

* Renames hardlinks -> hardlinks-local, cas -> hardlinks-global

* getCasDirectory -> getGlobalHardlinksDirectory

* globalHardlinksDirectory -> globalHardlinksStore

* More intelligent store recovery

* Do not check for file existence in atomicFileWrite

* Splits files in the storage to mitigate possible negative effects of directories with extra large number of files

Co-authored-by: Ali Zeaiter <[email protected]>
Co-authored-by: Ian Kerins <[email protected]>
Co-authored-by: Kristoffer K <[email protected]>
Co-authored-by: Maël Nison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants