Skip to content

Comments

fix: Missing Packages After bit new with Forked Env#10201

Open
zkochan wants to merge 11 commits intoteambit:masterfrom
zkochan:fix/10200
Open

fix: Missing Packages After bit new with Forked Env#10201
zkochan wants to merge 11 commits intoteambit:masterfrom
zkochan:fix/10200

Conversation

@zkochan
Copy link
Member

@zkochan zkochan commented Feb 19, 2026

close #10200

Two fixes for the chicken-and-egg problem where "+" dependency markers on a forked env couldn't resolve in a fresh workspace:

  1. workspace-manifest-factory.ts: widen usedPeerDependencies filter to include packages explicitly listed in the component's dep-resolver config, so pnpm will install them even before they appear in the resolved dependency manifest.

  2. apply-overrides.ts: in getDependenciesToAddManually(), when _manuallyAddPackage() can't resolve "+" from workspace package.json, check if the package was already resolved by applyAutoDetectedPeersFromEnvOnEnvItSelf() and remove it from missingPackageDependencies to prevent a false MissingManuallyConfiguredPackages issue.

Proposed Changes

zkochan and others added 3 commits February 19, 2026 17:57
…egression)

Reproduces the chicken-and-egg problem where forking an env with "+"
dep-resolver entries into a fresh workspace causes MissingManuallyConfiguredPackages
because the usedPeerDependencies filter excludes packages that aren't yet installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two fixes for the chicken-and-egg problem where "+" dependency markers
on a forked env couldn't resolve in a fresh workspace:

1. workspace-manifest-factory.ts: widen usedPeerDependencies filter to
   include packages explicitly listed in the component's dep-resolver
   config, so pnpm will install them even before they appear in the
   resolved dependency manifest.

2. apply-overrides.ts: in getDependenciesToAddManually(), when
   _manuallyAddPackage() can't resolve "+" from workspace package.json,
   check if the package was already resolved by
   applyAutoDetectedPeersFromEnvOnEnvItSelf() and remove it from
   missingPackageDependencies to prevent a false
   MissingManuallyConfiguredPackages issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zkochan zkochan marked this pull request as ready for review February 19, 2026 19:06
Copilot AI review requested due to automatic review settings February 19, 2026 19:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a regression where a fresh workspace created via bit new / bit fork with a forked env can end up with manually-configured "+" dependencies never getting installed (and repeatedly reported as missing), by ensuring those deps make it into the generated manifests and by reducing a related false-positive missing-deps report.

Changes:

  • Include env peer-deps in usedPeerDependencies when the package is explicitly present in the component’s dep-resolver policy (to break the "+" chicken-and-egg cycle).
  • Avoid reporting MissingManuallyConfiguredPackages when a + sentinel can’t be resolved but the package is already present in resolved package dependencies.
  • Add an e2e regression test covering the forked-env + marker scenario.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
scopes/dependencies/dependency-resolver/manifest/workspace-manifest-factory.ts Expands the usedPeerDependencies filter to also consider explicitly-configured dep-resolver policy packages.
scopes/dependencies/dependencies/dependencies-loader/apply-overrides.ts Removes a dependency from missingPackageDependencies when it’s already present in resolved package deps.
e2e/harmony/dependencies/forked-env-missing-deps.e2e.ts Adds regression coverage for the forked-env + dependency marker installation cycle.

zkochan and others added 2 commits February 20, 2026 15:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 15:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings February 24, 2026 08:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings February 24, 2026 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

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.

Missing Packages After bit new with Forked Env

1 participant